This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Formula Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Formula Help" Watch "Formula Help" New topic
Author

Formula Help

El Flocko
Greenhorn

Joined: Jun 22, 2004
Posts: 1
Evening All:

I am really new to java, and was wondering if anyone know (and be willing to share) how one would write this formula in Java? It is part of a larger project, and I am driving myself nuts trying to get it to work.

PPn = A*(1+i)^n-1 � Po*i(1+i)^n-1

(In case I typed it incorrectly, the n-1 is to the n power-1)

I understand having to import the java.Math, but am really confused as to the order to put it in. Thank you all in advance!





"If I wanted to hear the pitter-patter of little feet, I would put shoes on my cat."
Darin Niard
Ranch Hand

Joined: Jun 08, 2004
Posts: 118
Math.pow(A*(1+i),n-1) - Math.pow(Po*i*(1+i),n-1)

I don't know what exactly Po is.. but... just use Math.pow and lots of parentheses
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
El Flocko,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Formula Help
 
Similar Threads
Fibonacci Sum
New sort algorthim
Use of Math.pow?
Large Numbers
Laws of Statistics