REMAINDER(3) BSD Library Functions Manual REMAINDER(3)NAME
remainder, remainderf, remainderl, remquo, remquof, remquol -- minimal residue functions
LIBRARY
Math Library (libm, -lm)
SYNOPSIS
#include <math.h>
double
remainder(double x, double y);
float
remainderf(float x, float y);
long double
remainderl(long double x, long double y);
double
remquo(double x, double y, int *quo);
float
remquof(float x, float y, int *quo);
long double
remquol(long double x, long double y, int *quo);
DESCRIPTION
remainder(), remainderf(), remainderl(), remquo(), remquof(), and remquol() return the remainder r := x - n*y where n is the integer nearest
the exact value of x/y; moreover if |n - x/y| = 1/2 then n is even. Consequently the remainder is computed exactly and |r| <= |y|/2. But
attempting to take the remainder when y is 0 or x is +-infinity is an invalid operation that produces a NaN.
The remquo(), remquof(), and remquol() functions also store the last k bits of n in the location pointed to by quo, provided that n exists.
The number of bits k is platform-specific, but is guaranteed to be at least 3.
SEE ALSO fmod(3), ieee(3), math(3)STANDARDS
The remainder(), remainderf(), remainderl(), remquo(), remquof(), and remquol() routines conform to ISO/IEC 9899:1999 (``ISO C99''). The
remainder is as defined in IEEE Std 754-1985.
HISTORY
The remainder() and remainderf() functions appeared in 4.3BSD and FreeBSD 2.0, respectively. The remquo() and remquof() functions were added
in FreeBSD 6.0, and remainderl() and remquol() were added in FreeBSD 8.0.
BSD March 30, 2008 BSD
Check Out this Related Man Page
REMAINDER(3) BSD Library Functions Manual REMAINDER(3)NAME
remainder, remainderf, remquo, remquof -- remainder functions
LIBRARY
Math Library (libm, -lm)
SYNOPSIS
#include <math.h>
double
remainder(double x, double y);
float
remainderf(float x, float y);
double
remquo(double x, double y, int *quo);
float
remquof(float x, float y, int *quo);
DESCRIPTION
Provided that y != 0 , the remainder() and remainderf() functions calculate the floating-point remainder r of
r = x - ny,
where n is the integral value nearest to the exact value of x / y. If
| n - x / y | = 1/2 ,
the value n is chosen to be even. Consequently, the remainder is computed exactly and | r | <= | y | / 2 .
Also the remquo() and remquof() functions calculate the remainder as described above. But these additionally use quo to store a value whose
sign is the sign of x / y and whose magnitude is congruent modulo 2^k to the magnitude of the integral quotient of x / y, where k is an
implementation-defined integer greater than or equal to 3.
The rationale of the remquo() family of functions relates to situations where only few bits of the quotient are required. The exact repre-
sentation of the quotient may not be meaningful when x is large in magnitude compared to y.
RETURN VALUES
The functions return the remainder independent of the rounding mode. If y is zero , NaN is returned and a domain error occurs. A domain
error occurs and a NaN is returned also when x is infinite but y is not a NaN. If either x or y is NaN, a NaN is always returned.
SEE ALSO div(3), fast_remainder32(3), fmod(3), math(3)STANDARDS
The described functions conform to ISO/IEC 9899:1999 (``ISO C99'').
BSD September 18, 2011 BSD
This may seem like a stupid question to anyone but a novice , but I need help with the following ....
can anyone tell me how to change the following command to an "&" rather then an "or"
egrep "GMED|S26" fileForfiltering > newfilteredFile
i need it to contain both strings (on the same... (3 Replies)
I have a file in which I need to remove all newline characters but only if they are preceded by "^C" ( ASCII value 3 )
Basically this is a bulk copy file with "^B" and "^C" as delimiters for each record. The application producing the file is also appending a newline which I need to remove,... (1 Reply)
Hello,
We would like to perform tests on a product that my company created lately.
We don't have the right hardware for HP-UX enviornment
I've read the thred "Unix environments for MS Windows", but didn't see there a possibility to install HP-UX OS on a special compatible hardware.
We've... (4 Replies)
Hello. I have a problem with AWK and floats below 0 in a script.
It may be simplified to this line (please, take into account that my "locale" is Spanish, so the system will read "," as decimal separator):
echo -1,25 2,55745 0,33 ,278 | awk '{print $1+1, $2+1, $3+1, $4+1}'... getting:
-0,25... (4 Replies)
Hi i have a file with follw data
"20090427","0","","16371311","-100200","","","","16371311","JUL","09"
In the 10th column i need to convert the month name into month number in this case JUL will be 7 and append the 10th and 11th column which shows me the output as 709. Can you suggest a shell... (11 Replies)
Hi ,
I have a file like
I want to add a new line before "Realized" only when it comes after "Sheep".
There may be any line betwwen "Sheep" and "Realized" other than this two.
Say my new line is "a goat", so the desired result would be
Can any body help me in this?
thanks (10 Replies)
Hello All
It has been some time sense I was last here.
Hopefully I have a few points left to get this question answered.
I am finding that dstat is a really great tool, but does any one know what "init" and "csw" mean under the column --system--.
I am not able to find anything in the man... (0 Replies)
Hello All
It has been some time sense I was last here.
Hopefully I have a few points left to get this question answered.
I am finding that dstat is a really great tool, but does any one know what "init" and "csw" mean under the column --system--.
I am not able to find anything in the man... (2 Replies)
Hi All,
I have my data like below
"1","abc,db","hac,aron","4","5"
Now I need to extract 1,2,4th columns
Output should be like
"1",abc,db","4"
Am trying to use cut command but not able to get the results.
Thanks in advance. (4 Replies)