Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
scalb - load exponent of base-independent floating-point number
&pagelevel(4)&pagelevel
Syntax | #include <math.h> double scalb (double x, double n); |
Description | scalb() computes x*r n , where r is the base of the machine-dependent floating-point arithmetic. For r=2, scalb() is equivalent to ldexp() . |
Return val. | x *r n | if scalb() is executed successfully. |
| +-HUGE_VAL
| depending on the sign of x if scalb() causes an overflow. errno is set to ERANGE |
| 0
| if scalb() causes an underflow. errno is set to ERANGE . |
Errors | scalb() will fail if:
|
| ERANGE
| scalb() attempts an overflow or underflow.
|
Notes | An application that wants to check the error situation should set errno to 0 before the scalb() function is called. If on the return errno is then not equal to zero, this signals an error. For BS2000 the base is r=16. |
See also | ldexp() , math .h .
|