November 2017
Beginner
316 pages
6h 40m
English
There are some special floating point numbers that are worth mentioning:
They are obtained when we write an expression that does not evaluate to a real number:
julia> 1/0Infjulia> -1/0-Infjulia> 0/0NaNjulia> Inf/InfNaN
There are also some special functions that can prove to be useful in some scenarios. For example, if we need to find the next floating point number (that can be represented in Julia), there is a function provided by Julia that can help us to do so:
julia> nextfloat(0.0)5.0e-324
In the preceding example, it shows that the next floating point number after 0.0 is 5.0e-324.
Similarly, there is a function to find the previous float:
julia> prevfloat(0.0)-5.0e-324
Read now
Unlock full access