]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/remquo.3
tcp.7: Update info on tcp_syn_retries default value
[thirdparty/man-pages.git] / man3 / remquo.3
CommitLineData
fea681da 1.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
eb331ea6
MK
2.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3.\" <mtk.manpages@gmail.com>
2297bf0e 4.\"
38f20bb9 5.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
fea681da 6.\" Distributed under GPL
38f20bb9 7.\" %%%LICENSE_END
a5e73dd4 8.\"
fea681da
MK
9.\" based on glibc infopages
10.\" polished, aeb
a5e73dd4 11.\"
4b8c67d9 12.TH REMQUO 3 2017-09-15 "GNU" "Linux Programmer's Manual"
fea681da 13.SH NAME
c13182ef 14remquo, remquof, remquol \- remainder and part of quotient
fea681da
MK
15.SH SYNOPSIS
16.nf
fea681da 17.B #include <math.h>
68e4db0a 18.PP
fea681da 19.BI "double remquo(double " x ", double " y ", int *" quo );
fea681da 20.BI "float remquof(float " x ", float " y ", int *" quo );
fea681da 21.BI "long double remquol(long double " x ", long double " y ", int *" quo );
fea681da 22.fi
68e4db0a 23.PP
cc4615cc 24Link with \fI\-lm\fP.
68e4db0a 25.PP
cc4615cc
MK
26.in -4n
27Feature Test Macro Requirements for glibc (see
28.BR feature_test_macros (7)):
29.in
68e4db0a 30.PP
cc4615cc
MK
31.ad l
32.BR remquo (),
33.BR remquof (),
34.BR remquol ():
d91c9020 35.RS 4
e464f054 36_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
d91c9020
MK
37.RE
38.ad
fea681da
MK
39.SH DESCRIPTION
40These functions compute the remainder and part of the quotient
41upon division of
42.I x
43by
44.IR y .
45A few bits of the quotient are stored via the
46.I quo
c13182ef 47pointer.
eb331ea6 48The remainder is returned as the function result.
847e0d88 49.PP
fea681da
MK
50The value of the remainder is the same as that computed by the
51.BR remainder (3)
52function.
847e0d88 53.PP
fea681da
MK
54The value stored via the
55.I quo
56pointer has the sign of
646b2977 57.IR "x\ /\ y"
fea681da 58and agrees with the quotient in at least the low order 3 bits.
847e0d88 59.PP
646b2977 60For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2.
fea681da 61Note that the actual quotient might not fit in an integer.
fea681da
MK
62.\" A possible application of this function might be the computation
63.\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
64.\"
65.\" glibc, UnixWare: return 3 bits
66.\" MacOS 10: return 7 bits
eb331ea6
MK
67.SH RETURN VALUE
68On success, these functions return the same value as
69the analogous functions described in
70.BR remainder (3).
847e0d88 71.PP
eb331ea6
MK
72If
73.I x
74or
75.I y
76is a NaN, a NaN is returned.
847e0d88 77.PP
eb331ea6
MK
78If
79.I x
80is an infinity,
81and
82.I y
83is not a NaN,
efe294cb 84a domain error occurs, and
eb331ea6 85a NaN is returned.
847e0d88 86.PP
eb331ea6
MK
87If
88.I y
89is zero,
90and
91.I x
92is not a NaN,
efe294cb 93a domain error occurs, and
eb331ea6
MK
94a NaN is returned.
95.SH ERRORS
96See
97.BR math_error (7)
98for information on how to determine whether an error has occurred
99when calling these functions.
100.PP
101The following errors can occur:
102.TP
103Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \
104and the other argument is not a NaN
105.\" .I errno
106.\" is set to
107.\" .BR EDOM .
108An invalid floating-point exception
109.RB ( FE_INVALID )
110is raised.
111.PP
112These functions do not set
113.IR errno .
114.\" FIXME . Is it intentional that these functions do not set errno?
115.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802
f0d7ce1d
MK
116.SH VERSIONS
117These functions first appeared in glibc in version 2.1.
cf509809 118.SH ATTRIBUTES
f3635718
PH
119For an explanation of the terms used in this section, see
120.BR attributes (7).
121.TS
122allbox;
123lbw30 lb lb
124l l l.
125Interface Attribute Value
126T{
cf509809
PH
127.BR remquo (),
128.BR remquof (),
cf509809 129.BR remquol ()
f3635718
PH
130T} Thread safety MT-Safe
131.TE
47297adb 132.SH CONFORMING TO
9a74e018 133C99, POSIX.1-2001, POSIX.1-2008.
47297adb 134.SH SEE ALSO
fea681da
MK
135.BR fmod (3),
136.BR logb (3),
cc4615cc 137.BR remainder (3)