English
Language : 

CC78K4 Datasheet, PDF (244/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
7-12 frexp
Mathematical Functions
FUNCTION
frexp finds the mantissa and exponent part.
HEADER
math.h
FUNCTION PROTOTYPE
double frexp (double x, int *exp) ;
Function
frexp
Arguments
x ... Numeric value to perform
operation
exp ... Pointer to store
exponent part
Return Value
Normal ... Mantissa of x
When x = NaN, x = ±∞ ... NaN
When x = ±0 ... ±0
EXPLANATION
• Divides a floating-point number x into mantissa m and exponent n such as x = m*2^n and returns mantissa m.
• Exponent n is stored where the pointer exp indicates. The absolute value of m, however, is 0.5 or more and
less than 1.0.
• If x is non-numeric, NaN is returned and the value of *exp is 0.
• If x is infinite, NaN is returned, and EDOM is set to errno with the value of *exp as 0.
• If x is ±0, ±0 is returned and the value of *exp is 0.
244
User’s Manual U15556EJ1V0UM