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.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable