Use strict math in applications in Java

Description

The following code shows how to use strict math in applications.

Example


//from  w  w  w.  j  a  v a  2  s .c om
public class Main {
  public static void main(String[] args) {
    // Calculate E^2
    double e2 = StrictMath.E * StrictMath.E;

    System.out.println(e2);
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Development »




Java Algorithms
Java Clipboard
Java Compiler
Java Desktop
Java Virtual Machine
Java Math
OS
Random
Java Robot
Java RuntimeMXBean
Java Timer
Java UUID
Java Internationalization