Unverified Commit 4c98f5b4 authored by David Green's avatar David Green Committed by GitHub
Browse files

[DAG] Use copysign in frem power-2 fold. (#91751)

As a small addition to #91148, this uses copysign to produce the correct
sign for zero when converting frem to div/trunc/mul when we do not know
that the input is positive (and we care about sign bits). The copysign
lets us get the sign of zero correct.

In testing, the only case this produced different results than fmod was:
frem -inf, 4.0 -> nan vs -nan
parent ba8a2ade
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment