Commit 46a1a0b7 authored by Stuart Swales's avatar Stuart Swales Committed by ROOL
Browse files

Fix for modff() yielding wrong results

Detail:
  modff() single precision function yielded wrong results for both fractional
  and integral part for most numbers because the wrong exponent bias was subtracted.
parent 9297c9e4
......@@ -946,7 +946,7 @@ float modff(float value, float *iptr)
return value;
}
x.s = value;
if ((exponent = x.i.x - 0xff) < 0)
if ((exponent = x.i.x - 0x7f) < 0)
{ *iptr = copysignf(0.0F, value);
return value;
}
......
Markdown is supported
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