Java StrictMath.scalb(float f, int scaleFactor)
Syntax
StrictMath.scalb(float f, int scaleFactor) has the following syntax.
public static float scalb(float f, int scaleFactor)
Example
In the following code shows how to use StrictMath.scalb(float f, int scaleFactor) method.
//from ww w .j a v a 2 s. com
public class Main {
public static void main(String[] args) {
float f1 = 5.0f , f2 = 1.23f, f3 = 0.0f;
int power = 2;
System.out.println(StrictMath.scalb(f1 , power));
System.out.println(StrictMath.scalb(f2 , power));
System.out.println(StrictMath.scalb(f3 , power));
}
}
The code above generates the following result.