English
Language : 

CC78K0S Datasheet, PDF (266/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 10 LIBRARY FUNCTIONS
7-17 pow (normal model only)
Mathematical Functions
FUNCTION
pow finds the yth power of x.
HEADER
math.h
FUNCTION PROTOTYPE
double pow (double x, double y) ;
Function
pow
Arguments
x ... Numeric value on which
operation is performed
y ... Multiplier
Return Value
Normal ... x^y
Either when x = NaN or y =
NaN,
x = +∞ and y = 0
x < 0 and y≠ integer,
x < 0 and y = ±∞,
x = 0 and y < 0 ... NaN
When underflow occurs ...
Non-normalized number
When overflow occurs ...
HUGE_VAL (with the sign of
overflown value)
When annihilation of valid
digits occurs due to underflow
... ±0
EXPLANATION
• Calculates x^y.
• 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.
• When x = NaN or y = NaN, NaN is returned.
• When any of x = +∞ and y = 0, x < 0 and y ≠ integer, x < 0 and y = ±∞ or x = 0 and y ≤ 0, NaN is returned and
EDOM is set to errno.
• If an underflow occurs, a non-normalized number is returned.
• If annihilation of valid digits occurs due to underflow, ±0 is returned.
266
User’s Manual U14872EJ1V0UM