May 2019
Beginner to intermediate
466 pages
10h 44m
English
Floating-point numbers are represented by numerical values separated by a dot:
julia> 3.14 3.14 julia> -1.0 -1.0 julia> 0.25 0.25 julia> .5 0.5
By default they are Float64 values, but they can be converted to Float32:
julia> typeof(1.) Float64 julia> f32 = Float32(1.) 1.0f0 julia> typeof(f32) Float32
To improve readability, the underscore (_) separator can be used with both integers and floats:
julia> 1_000_000, 0.000_000_005 (1000000, 5.0e-9)
Read now
Unlock full access