1REMQUO(3) Linux Programmer's Manual REMQUO(3)
2
3
4
6 remquo, remquof, remquol - remainder and part of quotient
7
9 #include <math.h>
10
11 double remquo(double x, double y, int *quo);
12 float remquof(float x, float y, int *quo);
13 long double remquol(long double x, long double y, int *quo);
14
15 Link with -lm.
16
17 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19 remquo(), remquof(), remquol():
20 _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE ||
21 _POSIX_C_SOURCE >= 200112L;
22 or cc -std=c99
23
25 These functions compute the remainder and part of the quotient upon
26 division of x by y. A few bits of the quotient are stored via the quo
27 pointer. The remainder is returned as the function result.
28
29 The value of the remainder is the same as that computed by the remainā
30 der(3) function.
31
32 The value stored via the quo pointer has the sign of x / y and agrees
33 with the quotient in at least the low order 3 bits.
34
35 For example, remquo(29.0, 3.0) returns -1.0 and might store 2. Note
36 that the actual quotient might not fit in an integer.
37
39 On success, these functions return the same value as the analogous
40 functions described in remainder(3).
41
42 If x or y is a NaN, a NaN is returned.
43
44 If x is an infinity, and y is not a NaN, a domain error occurs, and a
45 NaN is returned.
46
47 If y is zero, and x is not a NaN, a domain error occurs, and a NaN is
48 returned.
49
51 See math_error(7) for information on how to determine whether an error
52 has occurred when calling these functions.
53
54 The following errors can occur:
55
56 Domain error: x is an infinity or y is 0, and the other argument is not
57 a NaN
58 An invalid floating-point exception (FE_INVALID) is raised.
59
60 These functions do not set errno.
61
63 These functions first appeared in glibc in version 2.1.
64
66 C99, POSIX.1-2001.
67
69 fmod(3), logb(3), remainder(3)
70
72 This page is part of release 3.53 of the Linux man-pages project. A
73 description of the project, and information about reporting bugs, can
74 be found at http://www.kernel.org/doc/man-pages/.
75
76
77
78GNU 2010-09-20 REMQUO(3)