Difference in floating-point results for sqrt vs exponentiation on nightly (possible regression?)

This used to work on previous versions of Julia, but fails on nightly

Julia 1.6 and 1.7rc1

julia> sqrt(1.5) == 1.5^0.5


julia> sqrt(1.5) == 1.5^0.5

I realize that floating-point results are not guaranteed to stay unchanged across versions, however are such results also expected to hold only approximately? Or would this be considered a regression?

1 Like

This is a result of my rewrite of pow. In the new behavior, we are off by 0.512 ULPs which is well within tolerance of what we are allowed. That said, it might be worth special casing raising the the .5 power. People use that a lot (even if they really shouldn’t)