xref: /csrg-svn/lib/libm/common_source/fmod.3 (revision 48922)
1*48922Scael.\" Copyright (c) 1991 The Regents of the University of California.
2*48922Scael.\" All rights reserved.
3*48922Scael.\"
4*48922Scael.\" %sccs.include.redist.man%
5*48922Scael.\"
6*48922Scael.\"     @(#)fmod.3	5.1 (Berkeley) 05/02/91
7*48922Scael.\"
8*48922Scael.Dd
9*48922Scael.Dt FMOD 3
10*48922Scael.Os
11*48922Scael.Sh NAME
12*48922Scael.Nm fmod
13*48922Scael.Nd floating-point remainder function
14*48922Scael.Sh SYNOPSIS
15*48922Scael.Fd #include <math.h>
16*48922Scael.Ft double
17*48922Scael.Fn fmod "double x" "double y"
18*48922Scael.Sh DESCRIPTION
19*48922ScaelThe
20*48922Scael.Fn fmod
21*48922Scaelfunction computes the floating-point remainder of
22*48922Scael.Fa x Ns / Fa y .
23*48922Scael.Sh RETURN VALUES
24*48922ScaelThe
25*48922Scael.Fn fmod
26*48922Scaelfunction returns the value
27*48922Scael.Sm off
28*48922Scael.Fa x - Em i * Fa y ,
29*48922Scael.Sm on
30*48922Scaelfor some integer
31*48922Scael.Em i
32*48922Scaelsuch that, if
33*48922Scael.Fa y
34*48922Scaelis non-zero, the result has the same sign as
35*48922Scael.Fa x
36*48922Scaeland magnitude less than the magnitude of
37*48922Scael.Fa y .
38*48922ScaelIf
39*48922Scael.Fa y
40*48922Scaelis zero, whether a domain error occurs or the
41*48922Scael.Fn fmod
42*48922Scaelfunction returns zero is implementation-defined.
43*48922Scael.Sh SEE ALSO
44*48922Scael.Xr math 3
45*48922Scael.Sh STANDARDS
46*48922ScaelThe
47*48922Scael.Fn fmod
48*48922Scaelfunction conforms to
49*48922Scael.St -ansiC .
50