aspose file tools*
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
Author

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,
Sahar
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18981
    
  40

Math.E

Math.log()

http://java.sun.com/javase/6/docs/api/java/lang/Math.html



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

Joined: Mar 10, 2008
Posts: 1821
    
    7

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
Author
Rancher

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.
 
Consider Paul's rocket mass heater.
 
subject: Mathematic function?