English
Language : 

CC78K4 Datasheet, PDF (249/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
7-17 pow
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 to perform
operation
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
overflowed 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 overflown value is returned, and
ERANGE is set to errno.
• When x = NaN or y = NaN, NaN is returned.
• Either when 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.
User’s Manual U15556EJ1V0UM
249