Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

remainder, remainderf, remainderl - remainder from division

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double remainder (double x, double y);
C11
float remainderf(float x, float y);
long double remainderl(long double x, long double y); (End)

Description

These functions return the floating-point remainder from dividing x by y. More precisely, they return the value r = x - yn if y != 0, where n is the integer closest to the exact value x/y.
If |n - x/y| =  1/ 2, the even value is chosen for n.

Return val.

Floating-point remainder = x-ny



if y != 0.

 

HUGE_VAL
HUGE_VALF
HUGE_VALL

depending on the function type, if y = 0.                       
errno wird gesetzt, um den Fehler anzuzeigen.

Errors

remainder(), remainderf() and remainderl() will fail if:


EDOM

y = 0 .

See also

abs(), remquo()math.h.