Return numbers multiplied by multiples of 2.
System. |
The scalb() method yields the outcome of the expression x times 2 raised to the power of y, where x is a floating-point number and y is an integer.
One of the following:
public |
public |
Parameter |
Description |
x |
“Necessary. The value to be multiplied by a power of 2.” |
y |
“Necessary. The exponent for the base of 2.” |
Returns: |
A numerical value, either a double or float, representing the outcome of the expression x⋅2yx \cdot 2^y. |
Java version: |
1.6+ |