Documentation Archive Developer
Search
ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



FMOD(3)                  BSD Library Functions Manual                  FMOD(3)

NAME
     fmod -- floating-point remainder function

SYNOPSIS
     #include <math.h>

     double
     fmod(double x, double y);

     long double
     fmodl(long double x, long double y);

     float
     fmodf(float x, float y);

DESCRIPTION
     The fmod() functions compute the floating-point remainder of x/ y.

     Specifically, the functions return the value x-i*y, for some integer i
     such that, if y is non-zero, the result has the same sign as x and magni-tude magnitude
     tude less than the magnitude of y.

SPECIAL VALUES
     fmod(+-0, y) returns +-0 for y not zero.

     fmod(x, y) returns a NaN and raises the "invalid" floating-point excep-tion exception
     tion for x infinite or y zero.

     fmod(x, +-infinity) returns x for x not infinite.

SEE ALSO
     math(3)

STANDARDS
     The fmod() functions conform to ISO/IEC 9899:1999(E).

BSD                            November 20, 2002                           BSD