Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a function in java to find the antilog? [duplicate]

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?

like image 517
Piyush Ranjan Avatar asked May 02 '26 03:05

Piyush Ranjan


1 Answers

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...
}
like image 86
user253751 Avatar answered May 04 '26 18:05

user253751