remainder(3M)




NAME

     remainder - remainder function


SYNOPSIS

     #include <math.h>

     double remainder(double x, double y);


DESCRIPTION

     The  remainder()  function  returns   the   floating   point
     remainder  r = x - ny when y is non-zero. The value n is the
     integral value nearest the exact value x/y. When |n - x/y| =
     1/2, the value n is chosen to be even.

     The behavior of remainder() is independent of  the  rounding
     mode.


RETURN VALUES

     The  remainder()  function  returns   the   floating   point
     remainder r = x - ny when y is non-zero.

     When y is 0, remainder() returns  NaN.  and  sets  errno  to
     EDOM.

     If the value of x is _Inf, remainder() returns NaN and  sets
     errno to EDOM.

     If x or y is NaN, then the function returns NaN.


ERRORS

     The remainder() function will fail if:

     EDOM  The y argument is 0 or the x argument is  positive  or
           negative infinity.


USAGE

     The remainder() function computes  the  remainder  x  REM  y
     required by ANSI/IEEE 754 (IEC 559).


ATTRIBUTES

     See attributes(5) for descriptions of the  following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | MT-Level                    | MT-Safe                     |
    |_____________________________|_____________________________|


SEE ALSO


     fmod(3M), attributes(5)


Man(1) output converted with man2html