man-pages/man3/remquo.3

67 lines
1.6 KiB
Groff
Raw Normal View History

2004-11-03 13:51:07 +00:00
.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
.\" Distributed under GPL
.\" based on glibc infopages
.\" polished, aeb
.TH REMQUO 3 2007-07-26 "GNU" "Linux Programmer's Manual"
2004-11-03 13:51:07 +00:00
.SH NAME
remquo, remquof, remquol \- remainder and part of quotient
2004-11-03 13:51:07 +00:00
.SH SYNOPSIS
.nf
.B #include <math.h>
.sp
.BI "double remquo(double " x ", double " y ", int *" quo );
.br
2004-11-03 13:51:07 +00:00
.BI "float remquof(float " x ", float " y ", int *" quo );
.br
2004-11-03 13:51:07 +00:00
.BI "long double remquol(long double " x ", long double " y ", int *" quo );
.fi
.sp
Link with \fI\-lm\fP.
.sp
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
.sp
.ad l
.BR remquo (),
.BR remquof (),
.BR remquol ():
_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
.I cc\ -std=c99
.ad b
2004-11-03 13:51:07 +00:00
.SH DESCRIPTION
These functions compute the remainder and part of the quotient
upon division of
.I x
by
.IR y .
A few bits of the quotient are stored via the
.I quo
pointer.
The remainder is returned as function value.
2004-11-03 13:51:07 +00:00
The value of the remainder is the same as that computed by the
.BR remainder (3)
function.
The value stored via the
.I quo
pointer has the sign of
.IR x / y
and agrees with the quotient in at least the low order 3 bits.
For example, remquo(29.0,3.0) returns \-1.0 and might store 2.
Note that the actual quotient might not fit in an integer.
.\" A possible application of this function might be the computation
.\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
.\"
.\" glibc, UnixWare: return 3 bits
.\" MacOS 10: return 7 bits
.SH "CONFORMING TO"
C99
.SH "SEE ALSO"
.BR fmod (3),
.BR logb (3),
.BR remainder (3)