File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Mathematic function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Mathematic function?" Watch "Mathematic function?" New topic

Mathematic function?

sahar sa
Ranch Hand

Joined: Jul 06, 2009
Posts: 102
Dear friends,
I need to code a formula which contains Natural logarithm and "e" power 3 for example. by e I mean the transcendental number which is around 2.71 ... .
Is there any constant in java as "e" or no?
Is there any function that can calculates Ln (natural logarithm)?
do you know any source that can help me?
Thank you so much,
Henry Wong

Joined: Sep 28, 2004
Posts: 20531



Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Jelle Klap

Joined: Mar 10, 2008
Posts: 1951

Have a look at java.lang.Math.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
David Newton

Joined: Sep 29, 2008
Posts: 12617

And if there wasn't already such a thing, just *type it in* and set it to a variable.
I agree. Here's the link:
subject: Mathematic function?
It's not a secret anymore!