3

I wanted to know if there is a function in java to find the antilogs or I would have to implement it myself? If so, how do I implement it?

Piyush Ranjan
  • 329
  • 1
  • 4
  • 9

1 Answers1

8

Math.exp(x) returns ex.

Example:

public static void main(String[] args) {
    System.out.println(Math.log(5)); // prints 1.6094...
    System.out.println(Math.exp(1)); // prints 2.7182...
    System.out.println(Math.exp(Math.log(5)); // prints 5.0000...
}
user253751
  • 57,427
  • 7
  • 48
  • 90