--- ../../../libc/manual/arith.texi 2007-11-19 12:00:50.000000000 +1100 +++ arith.texi 2007-11-19 03:01:41.000000000 +1100 @@ -1546,6 +1546,29 @@ This function is another name for @code{drem}. @end deftypefun +@comment math.h +@comment ISO_C99 +@deftypefun double remquo (double @var{numerator}, double @var{denominator}, int @var{*quo}) +@comment math.h +@comment ISO_C99 +@deftypefunx float remquof (float @var{numerator}, float @var{denominator}, int @var{*quo}) +@comment math.h +@comment ISO_C99 +@deftypefunx {long double} remquol (long double @var{numerator}, long double @var{denominator}, int @var{*quo}) + +These functions compute the remainder and part of the quotient upon division +of @var{numerator} by @var{denominator}. A few bits of the quotient are stored +via the @var{quo} pointer. The remainder is returned as function value. + +The value of the remainder is the same as that computed by the @code{remainder} +function above. The value stored via the @var{quo} pointer has the sign of +@var{numerator}/@var{denominator} and agrees with the quotient in at least the +low order 3 bits. + +For example, @code{remquo(29.0,3.0)} returns @code{-1.0} and might store @code{2}. +Note that the actual quotient might not fit in an integer. +@end deftypefun + @node FP Bit Twiddling @subsection Setting and modifying single bits of FP values @cindex FP arithmetic