1REMQUO(3)                  Linux Programmer's Manual                 REMQUO(3)
2
3
4

NAME

6       remquo, remquof, remquol - remainder and part of quotient
7

SYNOPSIS

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           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21

DESCRIPTION

23       These functions compute the remainder and part of the quotient upon di‐
24       vision of x by y.  A few bits of the quotient are stored  via  the  quo
25       pointer.  The remainder is returned as the function result.
26
27       The  value of the remainder is the same as that computed by the remain‐
28       der(3) function.
29
30       The value stored via the quo pointer has the sign of x / y  and  agrees
31       with the quotient in at least the low order 3 bits.
32
33       For  example,  remquo(29.0, 3.0)  returns -1.0 and might store 2.  Note
34       that the actual quotient might not fit in an integer.
35

RETURN VALUE

37       On success, these functions return the  same  value  as  the  analogous
38       functions described in remainder(3).
39
40       If x or y is a NaN, a NaN is returned.
41
42       If  x  is an infinity, and y is not a NaN, a domain error occurs, and a
43       NaN is returned.
44
45       If y is zero, and x is not a NaN, a domain error occurs, and a  NaN  is
46       returned.
47

ERRORS

49       See  math_error(7) for information on how to determine whether an error
50       has occurred when calling these functions.
51
52       The following errors can occur:
53
54       Domain error: x is an infinity or y is 0, and the other argument is not
55       a NaN
56              An invalid floating-point exception (FE_INVALID) is raised.
57
58       These functions do not set errno.
59

VERSIONS

61       These functions first appeared in glibc in version 2.1.
62

ATTRIBUTES

64       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
65       tributes(7).
66
67       ┌───────────────────────────────┬───────────────┬─────────┐
68Interface                      Attribute     Value   
69       ├───────────────────────────────┼───────────────┼─────────┤
70remquo(), remquof(), remquol() │ Thread safety │ MT-Safe │
71       └───────────────────────────────┴───────────────┴─────────┘

CONFORMING TO

73       C99, POSIX.1-2001, POSIX.1-2008.
74

SEE ALSO

76       fmod(3), logb(3), remainder(3)
77

COLOPHON

79       This page is part of release 5.10 of the Linux  man-pages  project.   A
80       description  of  the project, information about reporting bugs, and the
81       latest    version    of    this    page,    can     be     found     at
82       https://www.kernel.org/doc/man-pages/.
83
84
85
86GNU                               2017-09-15                         REMQUO(3)
Impressum