]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/remquo.3
Added/updated glibc feature test macro requirements
[thirdparty/man-pages.git] / man3 / remquo.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" based on glibc infopages
4 .\" polished, aeb
5 .TH REMQUO 3 2007-07-26 "GNU" "Linux Programmer's Manual"
6 .SH NAME
7 remquo, remquof, remquol \- remainder and part of quotient
8 .SH SYNOPSIS
9 .nf
10 .B #include <math.h>
11 .sp
12 .BI "double remquo(double " x ", double " y ", int *" quo );
13 .br
14 .BI "float remquof(float " x ", float " y ", int *" quo );
15 .br
16 .BI "long double remquol(long double " x ", long double " y ", int *" quo );
17 .fi
18 .sp
19 Link with \fI\-lm\fP.
20 .sp
21 .in -4n
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
24 .in
25 .sp
26 .ad l
27 .BR remquo (),
28 .BR remquof (),
29 .BR remquol ():
30 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
31 .I cc\ -std=c99
32 .ad b
33 .SH DESCRIPTION
34 These functions compute the remainder and part of the quotient
35 upon division of
36 .I x
37 by
38 .IR y .
39 A few bits of the quotient are stored via the
40 .I quo
41 pointer.
42 The remainder is returned as function value.
43
44 The value of the remainder is the same as that computed by the
45 .BR remainder (3)
46 function.
47
48 The value stored via the
49 .I quo
50 pointer has the sign of
51 .IR x / y
52 and agrees with the quotient in at least the low order 3 bits.
53
54 For example, remquo(29.0,3.0) returns \-1.0 and might store 2.
55 Note that the actual quotient might not fit in an integer.
56 .\" A possible application of this function might be the computation
57 .\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
58 .\"
59 .\" glibc, UnixWare: return 3 bits
60 .\" MacOS 10: return 7 bits
61 .SH "CONFORMING TO"
62 C99
63 .SH "SEE ALSO"
64 .BR fmod (3),
65 .BR logb (3),
66 .BR remainder (3)