Yogamurthy
Yogamurthy

Reputation: 998

How to find antilog for a number using java programm?

can someone please tell me How to find antilog for a number using java program? i am new to this java Math.log(10) gives the log value. now I want to take this output and verify using antilog that program is giving right value.please help me.

Upvotes: 1

Views: 4441

Answers (2)

Philipp Sander
Philipp Sander

Reputation: 10249

mathematically: e^(ln x) = x

in java:

Math.pow(Math.E, (Math.log(x)) == x; //equals true

Upvotes: 5

Darshan Mehta
Darshan Mehta

Reputation: 30839

You can use Logarithm class in Java to calculate log and antilog. More on this is provided here.

Upvotes: 2

Related Questions