|
CC78K4 Datasheet, PDF (248/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language | |||
|
◁ |
CHAPTER 10 LIBRARY FUNCTIONS
7-16 modf
Mathematical Functions
FUNCTION
modf finds the fraction part and integer part.
HEADER
math.h
FUNCTION PROTOTYPE
double modif (double x, double *iptr);
Function
modif
Arguments
x ... Numeric value to perform
operation
iptr ... Pointer to integer part
Return Value
Normal ... Fraction part of x
When x is non-numeric or
infinite ... NaN
When x is ±0 ... ±0
EXPLANATION
⢠Divides a floating-point number x into a fraction part and integer part
⢠Returns the fraction part with the same sign as that of x, and stores the integer part in the location indicated
by the pointer iptr.
⢠If x is non-numeric, NaN is returned and stored in the location indicated by the pointer iptr.
⢠If x is infinite, NaN is returned and stored in the location indicated by the pointer iptr, and EDOM is set to
errno.
⢠If x = ±0, ±0 is stored in the location indicated by the pointer iptr.
248
Userâs Manual U15556EJ1V0UM
|
▷ |