Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculating Ln and exponent

 
Ian Cockcroft
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, I have two functions that need to return the ln of a parameter and the exponent of a parameter. How would I do this?


Thanks
Ian
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers don't generally do homework for you, unless maybe for a fee that would let me retire tomorrow. Are you stuck on the math algorithms? I'd just Google for those. Give it a shot and see if you can get something going!
[ August 02, 2007: Message edited by: Stan James ]
 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The keyword to Google on is the "Math" class.

Kaydell
 
David McCombs
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kaydell Leavitt:
The keyword to Google on is the "Math" class.

Kaydell


Only if he is allowed to use the Math class, which it doesn't sound like it is permissible.. Besides Google isn't necessary, just go here.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is for a class, perhaps using a Taylor series would be appropriate for each. There may well be better ways to do this, depending on the desired domain of the functions, and how much effort it's worth to optimize speed. But that's where I'd probably start, assuming a Google search numeric approximations for eponentials and logarithms doesn't give you better ideas.

Of course if it's not for a class, then yes there's a much simpler solution suggested in earlier answers...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic