Tie-breaking correctness of sqrt and cbrt in Julia’s binary32 implementations

Determine whether Julia’s implementations of sqrt(x) and cbrt(x) for the Float32 (IEEE 754 binary32) format produce correctly rounded results under round-to-nearest ties-to-even across their entire input domains by verifying that tie cases are handled with proper even rounding.

Background

The paper measures worst-case ULP errors of Julia’s mathematical functions. For binary32, the authors observe that sqrt and cbrt exhibit maximum errors consistent with correct rounding (approximately 0.5 ULP), but they cannot confirm whether ties are broken correctly, which is required to establish correct rounding under round-to-nearest ties-to-even.

Confirming tie-breaking behavior is necessary to conclude that these functions are correctly rounded. The uncertainty arises because achieving exactly 0.5 ULP does not, by itself, demonstrate that all midpoint cases round to the even significand as mandated by IEEE 754.

References

Finally, only sqrt and cbrt may be correctly rounded (‘‘may be’’ because we don’t know if the ties are broken correctly), whilst cospi, sinpi, tanpi, cos, and sin are very close to 0.5ULPs.

Accuracy of Mathematical Functions in Julia  (2509.05666 - Mikaitis et al., 6 Sep 2025) in Subsubsection “Functions approximated for the binary32 format” (Results section)