Re: [PHP] precision using pow()

2002-09-06 Thread Marek Kilimajer
Hi, Split the calculation up an use echo to find the problem. David Rice wrote: > Hi: > I am attempting to calculate a mortgage payment using the following code. > > $P = 10;// principal outstanding > $I = 4.5;// annual interest rate percentage > $N = 20;// number of yea

[PHP] precision using pow()

2002-09-05 Thread David Rice
Hi: I am attempting to calculate a mortgage payment using the following code. which produces: 630.40515566726 What I am looking for is 632.65 (rounded to 2 places). (I am not looking for a rounding mechanism, just a more accurate result) The manual states that the pow function attempts to ret