茱莉亚分形
Julia| NaN / Nan64常数 (Julia | NaN/Nan64 Constant)
Nan / Nan64 is a constant of the Float64 type in Julia programming language, it represents "not-a-number" value.
Nan / Nan64是Julia编程语言中Float64类型的常量,它表示“非数字”值。
Syntax:
句法:
NaN
NaN64
Example:
例:
In this example, we are taking two variables x and y and assigning them with NaN and NaN64. We are printing the values and types of x and y using println() function and typeof() function. We are also comparing the NaN and NaN64.
在此示例中,我们采用两个变量x和y ,并为其分配NaN和NaN64 。 我们正在使用println()函数和typeof()函数打印x和y的值和类型。 我们还在比较NaN和NaN64 。
# Julia example of NaN and NaN64
x = NaN
y = NaN64
println("x: ", x)
println("y: ", y)
println("typeof(x): ", typeof(x))
println("typeof(y): ", typeof(y))
# checking whether NaN and NaN64 are same
println("NaN==NaN: ", NaN==NaN64)
Output
输出量
x: NaN
y: NaN
typeof(x): Float64
typeof(y): Float64
NaN==NaN: false
Reference: Julia constants
参考: Julia常数
翻译自: https://www.includehelp.com/julia/nan-constant.aspx
茱莉亚分形