English
Language : 

CC78K4 Datasheet, PDF (268/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
7-36 ldexpf
Mathematical Functions
FUNCTION
ldexpf finds x*2^exp.
HEADER
math.h
FUNCTION PROTOTYPE
float ldexpf (float x, int exp);
Function
ldexpf
Arguments
x ... Numeric value to perform
operation
exp ... Exponentiation
Return Value
Normal ... x*2^exp
When x = NaN ... NaN
When x = ±∞ ... ±∞
When x = ±0 ... ±0
When overflow occurs ...
HUGE=VAL (with the sign of
overflowed value)
When underflow occurs ...
Non-normalized numberV
When annihilation of valid
digits occurs due to underflow
... ±0
EXPLANATION
• Calculates x*2^exp.
• If x is non-numeric, NaN is returned. If x is ±∞, ±∞ is returned. If x is ±0, ±0 is returned.
• If overflow occurs as a result of operation, HUGE_VAL with the sign of overflowed value is returned and
ERANGE is set to errno.
• If an underflow occurs as a result of the operation, a non-normalized number is returned.
• If annihilation of valid digits due to underflow occurs as a result of the operation, ±0 is returned.
268
User’s Manual U15556EJ1V0UM