This was seen on a 32-bit Xeon system:
julia> ndigf(n)=float64(log(float32(n)))
julia> ndigf(256)
5.5451774444736657
julia> float64(log(float32(256)))
5.5451774597167969
julia> log(256)
5.5451774444795623
The last answer is correct, the middle one is the float64 conversion of the correctly-rounded float32 answer, and the first one is something strange.
julia> num2hex(5.5451774444795623)
"40162e42fefa39ef"
julia> num2hex(5.5451774444736657)
"40162e42fefa2000"
Looks like the float64 answer with the last 13 bits zero'd.
Happens with some functions, e.g. log and sin, but not with sqrt.
This was seen on a 32-bit Xeon system:
The last answer is correct, the middle one is the float64 conversion of the correctly-rounded float32 answer, and the first one is something strange.
Looks like the float64 answer with the last 13 bits zero'd.
Happens with some functions, e.g. log and sin, but not with sqrt.