[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

remainder, remainderf, or remainderl Subroutine

Purpose

Returns the floating-point remainder.

Syntax

#include <math.h>

double remainder (x, y)
double x;
double y;

float remainderf (x, y)
float x; 
float y;

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

Description

The remainder, remainderf, and remainderl subroutines return the floating-point remainder r=x - ny when y is nonzero. The value n is the integral value nearest the exact value x/y. When | n x/y |=½ , the value n is chosen to be even.

Parameters

x Specifies the value of the numerator.
y Specifies the value of the denominator.

Return Values

Upon successful completion, the remainder, remainderf, and remainderl subroutines return the floating-point remainder r=x - ny when y is nonzero.

If x or y is NaN, a NaN is returned.

If x is infinite or y is 0 and the other is non-NaN, a domain error occurs, and a NaN is returned.

Related Information

abs Subroutine, feclearexcept Subroutine, fetestexcept Subroutine, and lldiv Subroutine in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1.

math.h in AIX 5L Version 5.2 Files Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]