The current code "return getExp ? posInf : posInf;" looks like a typo.
But when the argument is positive infinity then both the significand
and the exponent are positive infinity (there is a fxtract testcase that
checks that). So no need to check getExp. Just always return posInf
if arg == posInf, but add a comment explaining why.
/* Mimic Core i5 behaviour for special cases. */
if (arg == posInf)
- return getExp ? posInf : posInf;
+ return posInf; /* Both significand and exponent are posInf. */
if (arg == negInf)
return getExp ? posInf : negInf;
if ((arg & nanMask) == nanMask)