1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
9 .\" based on glibc infopages
12 .TH REMQUO 3 2015-03-02 "GNU" "Linux Programmer's Manual"
14 remquo, remquof, remquol \- remainder and part of quotient
19 .BI "double remquo(double " x ", double " y ", int *" quo );
21 .BI "float remquof(float " x ", float " y ", int *" quo );
23 .BI "long double remquol(long double " x ", long double " y ", int *" quo );
29 Feature Test Macro Requirements for glibc (see
30 .BR feature_test_macros (7)):
38 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
39 _POSIX_C_SOURCE\ >=\ 200112L;
46 These functions compute the remainder and part of the quotient
51 A few bits of the quotient are stored via the
54 The remainder is returned as the function result.
56 The value of the remainder is the same as that computed by the
60 The value stored via the
62 pointer has the sign of
64 and agrees with the quotient in at least the low order 3 bits.
66 For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2.
67 Note that the actual quotient might not fit in an integer.
68 .\" A possible application of this function might be the computation
69 .\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
71 .\" glibc, UnixWare: return 3 bits
72 .\" MacOS 10: return 7 bits
74 On success, these functions return the same value as
75 the analogous functions described in
82 is a NaN, a NaN is returned.
90 a domain error occurs, and
99 a domain error occurs, and
104 for information on how to determine whether an error has occurred
105 when calling these functions.
107 The following errors can occur:
109 Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \
110 and the other argument is not a NaN
114 An invalid floating-point exception
118 These functions do not set
120 .\" FIXME . Is it intentional that these functions do not set errno?
121 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802
123 These functions first appeared in glibc in version 2.1.
125 For an explanation of the terms used in this section, see
131 Interface Attribute Value
136 T} Thread safety MT-Safe
139 C99, POSIX.1-2001, POSIX.1-2008.