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(): _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE;
20       or cc -std=c99
21

DESCRIPTION

23       These functions compute the remainder and part  of  the  quotient  upon
24       division  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

CONFORMING TO

64       C99, POSIX.1-2001.
65

SEE ALSO

67       fmod(3), logb(3), remainder(3)
68

COLOPHON

70       This page is part of release 3.25 of the Linux  man-pages  project.   A
71       description  of  the project, and information about reporting bugs, can
72       be found at http://www.kernel.org/doc/man-pages/.
73
74
75
76GNU                               2008-08-11                         REMQUO(3)
Impressum