Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,926 questions

51,859 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, 2019 by avibootz

Related questions

1 answer 207 views
207 views asked Jun 11, 2019 by avibootz
1 answer 157 views
1 answer 161 views
1 answer 109 views
109 views asked Sep 21, 2023 by avibootz
...