dec21140A ethernet driver for virtualpc, contributed by nicolas tittley.
[minix.git] / man / man3 / remainder.3
blobd84944f0af911102800f3fa2e2dc0a1a1ec7919c
1 .TH REMAINDER 3  "December 18, 2009"
2 .UC 4
3 .SH NAME
4 remainder \- floating point remainder after division
5 .SH SYNOPSIS
6 .nf
7 .ft B
8 #include <math.h>
10 double remainder(double \fIx\fP, double \fIy\fP);
11 .fi
12 .SH DESCRIPTION
13 This function returns the remainder of a division of \fIx\fP by \fIy\fP. More
14 formally, it computes which integer \fIn\fP is closest to the fraction 
15 \fIx\fP/\fIy\fP and returns \fIx\fP - \fIn\fP*\fIy\fP. An even value for 
16 \fIn\fP is preferred over an odd one if both are equally far away (that is, 
17 banker's rounding is applied). If \fIx\fP is infinite or \fIy\fP is zero, 
18 a NaN value is returned.
19 .SH "RETURN VALUE"
20 The function returns the remainder of a division of \fIx\fP by \fIy\fP.