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

Technical Reference: Base Operating System and Extensions, Volume 2

remquo, remquof, or remquol Subroutine

Purpose

Returns the floating-point remainder.

Syntax

#include <math.h>

double remquo (x, y, quo)
double x; 
double y;
int *quo;

float remquof (x, y, quo)
float x; 
float y;
int *quo;

long double remquol (x, y, quo)
long double x;
long double y;
int *quo;

Description

The remquo, remquof, and remquol subroutines compute the same remainder as the remainder, remainderf, and remainderl functions, respectively. In the object pointed to by quo, they store a value whose sign is the sign of x/y and whose magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where n is 3.

An application wishing to check for error situations should set the errno global variable to zero and call feclearexcept(FE_ALL_EXCEPT) before calling these subroutines. Upon return, if errno is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.

Parameters

x Specifies the value of the numerator.
y Specifies the value of the denominator.
quo Points to the object where a value whose sign is the sign of x/y is stored.

Return Values

The remquo, remquof, and remquol subroutines return x REM y.

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

If x is ±Inf or y is zero and the other argument is non-NaN, a domain error occurs, and a NaN is returned.

Related Information

remainder, remainderf, or remainderl Subroutine

feclearexcept Subroutine, fetestexcept 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 ]