summaryrefslogtreecommitdiffstats
path: root/man3/fmod.3
blob: 6cafed5cffa3976b8d6d5996b4133a57899b58dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\" May be distributed under the GNU General Public License
.\" References consulted:
.\"     Linux libc source code
.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\"     386BSD man pages
.\" Modified Sat Jul 24 19:36:29 1993 by Rik Faith (faith@cs.unc.edu)
.TH FMOD 3  "June 6, 1993" "" "Linux Programmer's Manual"
.SH NAME
fmod \- floating-point remainder function
.SH SYNOPSIS
.nf
.B #include <math.h>
.sp
.BI "double fmod(double " x ", double " y );
.fi
.SH DESCRIPTION
The \fBmodf()\fP function computes the remainder of dividing \fIx\fP by
\fIy\fP.  The return value is \fIx\fP - \fIn\fP * \fIy\fP, where \fIn\fP
is the quotient of \fIx\fP / \fIy\fP, rounded towards zero to an integer.
.SH "RETURN VALUE"
The \fBfmod()\fP function returns the remainder, unless \fIy\fP is zero,
when the function fails and \fIerrno\fP is set.
.SH "ERRORS"
.TP
.B EDOM
The denominator \fIy\fP is zero.
.SH "CONFORMING TO"
SVID 3, POSIX, BSD 4.3, ISO 9899
.SH SEE ALSO
.BR drem (3)