English
Language : 

CC78K0S Datasheet, PDF (288/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 10 LIBRARY FUNCTIONS
7-39 modff (normal model only)
Mathematical Functions
FUNCTION
modff finds the fraction part and integer part.
HEADER
math.h
FUNCTION PROTOTYPE
float modff (float x, float *iptr) ;
Function
modff
Arguments
x ... Numeric value on which
operation is performed
iptr ... Pointer for integer part
Return Value
Normal ... Fraction part of x
When x is non-numeric or
infinite ... NaN
When x = ±0 ... ±0
EXPLANATION
• Divides a floating point number x by the 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 returned and stored in the location indicated by the pointer iptr.
288
User’s Manual U14872EJ1V0UM