You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current XMVectorRound uses round-to-nearest (even) a.k.a. banker's rounding. This matches the implementation of the _mm_round_ps (SSE4) and vrndnq_f32 (ARMv8 NEON) intrinsics rounding behavior, so it can be implemented in a single instruction.
Many users, however, expect it to match roundf which C99 defines as handling half-way values by rounding away from zero a.k.a. commercial rounding. It might therefore be useful to provide an alternative version of XMVectorRound that supports half away-from-zero rounding instead of round-to-nearest (even).
The current
XMVectorRound
uses round-to-nearest (even) a.k.a. banker's rounding. This matches the implementation of the_mm_round_ps
(SSE4) andvrndnq_f32
(ARMv8 NEON) intrinsics rounding behavior, so it can be implemented in a single instruction.Many users, however, expect it to match
roundf
which C99 defines as handling half-way values by rounding away from zero a.k.a. commercial rounding. It might therefore be useful to provide an alternative version ofXMVectorRound
that supports half away-from-zero rounding instead of round-to-nearest (even).See Wikipedia
The text was updated successfully, but these errors were encountered: