man-pages/man3/remquo.3

54 lines
1.4 KiB
Groff

.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
.\" Distributed under GPL
.\" based on glibc infopages
.\" polished, aeb
.TH REMQUO 3 2002-08-10 "gnu" "Linux Programmer's Manual"
.SH NAME
remquo, remquof, remquol \- remainder and part of quotient
.SH SYNOPSIS
.nf
#define _ISOC99_SOURCE
.br
.B #include <math.h>
.sp
.BI "double remquo(double " x ", double " y ", int *" quo );
.br
.BI "float remquof(float " x ", float " y ", int *" quo );
.br
.BI "long double remquol(long double " x ", long double " y ", int *" quo );
.fi
.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.
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),
.BR feature_test_macros (7)