llvm::frexp

Equivalent of C standard library function.

Synopsis

Declared in <llvm/ADT/APFloat.h>

APFloat
frexp(
    APFloat const& X,
    int& Exp,
    roundingMode RM);

Description

While the C standard says Exp is an unspecified value for infinity and nan, this returns INT_MAX for infinities, and INT_MIN for NaNs.

Return Value

the significand of X in the range [0.5, 1)]

Parameters

NameDescription
Xvalue to split into significand and exponent
Exp [out]set to the unbiased exponent of X
RMrounding mode for the significand