Java StrictMath.scalb(double d, int scaleFactor)

Syntax

StrictMath.scalb(double d, int scaleFactor) has the following syntax.

public static double scalb(double d,  int scaleFactor)

Example

In the following code shows how to use StrictMath.scalb(double d, int scaleFactor) method.


//from w  w w .  j  a  va2 s. c  o  m
public class Main {

  public static void main(String[] args) {
  
    double d1 = 1.2 , d2 = 3.4, d3 = 0.0;
    int power = 2;

    System.out.println(StrictMath.scalb(d1, power));
        
    System.out.println(StrictMath.scalb(d2, power));
        
    System.out.println(StrictMath.scalb(d3, 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