Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
Bonsai Boy of New York Bonsai Trees and Accessories

BlueHost Web Hosting

Liquid Web iThemes WordPress Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

DreamHost Web Hosting


getResponse autofunnels

Liquid Web Cloud VPS Hosting

11,619 questions

15,845 answers

573 users

How to use exponent math methods in Java

1 Answer

0 votes
public class MyClass {
    public static void main(String args[]) {
       System.out.println("1) " + Math.exp(0.1));
       System.out.println("2) " + Math.exp(10));
       
       System.out.println("3) " + Math.log(Math.E));
       System.out.println("4) " + Math.log(10));
       
       System.out.println("5) " + Math.log10(100));
       System.out.println("6) " + Math.log10(10));
       
       System.out.println("7) " + Math.pow(2, 3));
       System.out.println("8) " + Math.pow(3.14, 2));
       
       System.out.println("9) " + Math.sqrt(9));
       System.out.println("10) " + Math.sqrt(13.5));
    }
}



/*
run:

1) 1.1051709180756477
2) 22026.465794806718
3) 1.0
4) 2.302585092994046
5) 2.0
6) 1.0
7) 8.0
8) 9.8596
9) 3.0
10) 3.6742346141747673

*/

 




answered Jun 10 by avibootz
...