Upon successful completion, the scalb() function returns x * rn.
If the correct value would overflow, scalb() returns +-HUGE_VAL (according to the sign of x) and sets errno to ERANGE.
If the correct value would underflow to 0.0, scalb() returns 0 and sets errno to ERANGE.
The scalb() function returns x when x is +-Inf.
If x or n is NaN, then scalb() returns NaN.
For exceptional cases, matherr(3M) tabulates the values to be returned as dictated
by Standards other than XPG4.
|