#include <math.h>double copysign(x, y) double x, y;
double drem(x, y) double x, y;
double logb(x) double x;
double scalb(x, n) double x; int n;
Copysign(x,y) returns x with the sign of y.
Drem(x,y) returns r when y is not equal to 0; the remainder r is defined by the mathematical relation r=x-y*n where n is the integer nearest the exact value x/y; whenever |n-x/y|=1/2, then n is even. Thus, the remainder is always exact.
Logb(x) returns the exponent of x, a signed integer in double precision. When x is positive, the expression scalb(x,(int)(-logb(x))) lies strictly between 1 and 2; the expression equals 1 only if x is a power of 2.
Scalb(x,n) returns x*(2**n), x*2\u\s8n\s10\d, for integer values n without computing 2**n. 2\u\s8n\s10\d.