With f = -9.223372036854776e18
, (f/2):0.0
gives a range of floats, while f:0.0
gives the following error:
ERROR: InexactError: trunc(Int64, 9.223372036854776e18)
Stacktrace:
[1] trunc
@ ./float.jl:905 [inlined]
[2] round
@ ./float.jl:385 [inlined]
[3] (::Colon)(start::Float64, step::Float64, stop::Float64)
@ Base ./twiceprecision.jl:427
[4] (::Colon)(a::Float64, b::Float64)
@ Base ./range.jl:14
[5] top-level scope
I’m struggling to understand what boundary I’m crossing going from f/2
to f
that makes Julia not able to give me a value for f:0.0
!