F.9.3.4 The frexp functions

1

  • frexp((+-)0, exp) returns (+-)0, and stores 0 in the object pointed to by exp.

  • frexp((+-)(inf), exp) returns (+-)(inf), and stores an unspecified value in the object pointed to by exp.

  • frexp(NaN, exp) stores an unspecified value in the object pointed to by exp (and returns a NaN).

2

frexp raises no floating-point exceptions.

3

On a binary system, the body of the frexp function might be

{
       *exp = (value == 0) ? 0 : (int)(1 + logb(value));
       return scalbn(value, -(*exp));
}