I'm using Julia version 1.6.2
julia> 2 < 1
false
julia> 2.0f32 < 1.0f32
false
julia> 2 < 1.0f32
true
Is this expected behavior? I don't understand what's going on here.
I'm using Julia version 1.6.2
julia> 2 < 1
false
julia> 2.0f32 < 1.0f32
false
julia> 2 < 1.0f32
true
Is this expected behavior? I don't understand what's going on here.
The reason is that 32 is exponent value, so you have:
julia> Float32(1)
1.0f0
julia> big(1.0f32)
1.00000003318135351409612647563264e+32
and therefore:
julia> 1 == 1.0f32
false
julia> 1 == 1.0f0
true