This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 18498



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

Joined: Mar 10, 2008
Posts: 1752

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.
subject: Mathematic function?
Similar Threads
How to calculate log values of base 2
Sort the Array in reverse order
Rasing BigDecimal to a power
To calculate 9th root of any number without using build in function
For Loop Performance