English
Language : 

CC78K0S Datasheet, PDF (285/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 10 LIBRARY FUNCTIONS
7-36 ldexpf (normal model only)
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 on which
operation is performed
exp ... Exponent
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
overflown 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 an overflow occurs as a result of the 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.
User’s Manual U14872EJ1V0UM
285