@JonahStumbled across this seemingly simple FV problem here.

an accountant is paid $0.01 per second every day and night for a year. the money is deposited directly into her bank account which pays 10% interest pa compounded every second. what is the correct bank balance after one year?

Author's scicalc gets 331667.006690776891780341908435

Both my calculators are only up to 331665.995684669

Maybe I should get a ti.

Samsung phone: 331667.01312868

Google calculator: 331667.01255977619

Excel: ?????? Sorry, no access right now.

Perhaps Sir AbrahamA, with tadRATE function, could match the author's results.

Due to lack of English comprehension, I dragged your original thread without realizing you were looking for a solution to finding correct TVM calculations when interest rates are too small

As you have shown the Samsung phone, Google calculator, Excel and even tadXL were displaying inaccurate results for FV calculations as interest rates go so small with secondly compounding

I have amended the code I use in my tadFV version of the Excel FV function to address the issue of loss of precision as rates get too small

The test data shows the correct value for the investment you had described

Please note that running for the test data in the browser will take a little time and you may see a message by browser to continue running the script. This is so as there are large number of iterations being carried out to find present value of 31536000 payments in amount of 0.01

As I use the long form formula (sum of series) rather than closed annuity formula because in my version of TVM functions that are a lot more variables involved that can not be represented in short form annuity formula

I hope you find the code useful

The FV function

More about tadXL functions is found here tadIRR|Excel IRR functionCode:FV(rate, gradient, nper, pmt_deferred_by, pmt, pv, atype, compounding, period, distribution, infinity)

The results

The source codeCode:RATE = 0.1 GRADIENT = 0 NPER = 31536000 PMT deferred by = 0 PMT = -0.01 PV = 0 TYPE = 0 COMPOUNDING = 3.1709791983764586e-8 PERIOD = 3.1709791983764586e-8 DISTRIBUTION = 1 INFINITY = 0 FV = 331667.00669082074

Code:<script> rate = 0.1; gradient = 0; nper = 31536000; pmt_deferred_by = 0; pmt = -0.01; pv = 0; atype = 0; compounding = 1.0/31536000; period = 1.0/31536000; distribution = 1; infinity = 0; document.write("RATE = "+ rate +"<br/>"); document.write("GRADIENT = "+ gradient +"<br/>"); document.write("NPER = "+ nper +"<br/>"); document.write("PMT deferred by = "+ pmt_deferred_by +"<br/>"); document.write("PMT = "+ pmt +"<br/>"); document.write("PV = "+ pv +"<br/>"); document.write("TYPE = "+ atype +"<br/>"); document.write("COMPOUNDING = "+ compounding +"<br/>"); document.write("PERIOD = "+ period +"<br/>"); document.write("DISTRIBUTION = "+ distribution +"<br/>"); document.write("INFINITY = "+ infinity +"<br/>"); fv = FV(rate, gradient, nper, pmt_deferred_by, pmt, pv, atype, compounding, period, distribution, infinity); document.write("FV = "+fv); function ln1 (x) { var s = x; var c = 2; var t; var s1; if (Math.abs(x) >= 0.01) return Math.log(1+x); x = -x; t = x; for (;;) { t *= x; s1 = s - t/c; if (s1 == s) break; c += 1; s = s1; } return s1; } function aey(r, c) { if (r==0.0) return 0.0; if (c==0.0) return exp(r) - 1; else return Math.exp(1/c * ln1(r*c)) - 1; } function fvif(r, n, c) { return Math.exp(n * ln1(aey(r,c))); } function pvif(r, n, c) { return Math.exp(-n * ln1(aey(r,c))); } function pvif2(r, n, c, p, d) { t = (n-1)*p+p*d; return Math.exp(-t * ln1(aey(r,c))); } function pvifga(r, g, f, dt, atype, c, p, d,inf) { pv=0.0; t=0.0; gt=0.0; nn=0.0; NN=0.0; remaining=0.0; aif=0.0; af1n=0.0; af1d=0.0; af2n=0.0; af2d=0.0; af1=0.0; af2=0.0; af=0.0; if (inf == 0) { n = Math.floor(f); for (i=0; i<n; i++) { if (atype == 0) t = (i*p+d*p) + ((dt-1)*p+d*p); else { if (i==0) t = ((dt-1)*p+d*p); else t = ((i-1)*p+d*p) + ((dt-1)*p+d*p); } if (i==0) gt = 0; else gt = (i-1)*p+d*p; pv += fvif(g,gt,c) * pvif(r,t,c); } } else { pv += Math.pow(aey(r,c)-aey(g,c),-1.0) * pvif2(r,dt,c,p,d); } remaining = f - Math.floor(f); if (remaining != 0.0) { NN = (f-1)*p+p*d; nn = (Math.floor(f)-1)*p+p*d; if (r==g) { af1n = f * fvif(aey(r,c)*atype,p*d,1); af1d = fvif(aey(g,c),p*d,1); af2n = Math.floor(f) * fvif(aey(r,c)*atype,p*d,1); af2d = fvif(aey(g,c),p*d,1); af1 = af1n/af1d; af2 = af2n/af2d; af = af1 - af2; } else { aif = fvif(aey(r,c)*atype,p*d,1); af1n = fvif(g,nn,c)*pvif(r,nn,c); af1d = (aey(r,c)-aey(g,c)); af2n = fvif(g,NN,c)*pvif(r,NN,c); af2d = (aey(r,c)-aey(g,c)); af1 = (aif*af1n)/af1d; af2 = (aif*af2n)/af2d; af = af1 - af2; } pv += af * pvif2(r,dt,c,p,d); } return pv; } function FV(rate, gradient, nper, pmt_deferred_by, pmt, pv, atype, compounding, period, distribution, infinity) { atype = (typeof atype !== "undefined") ? atype : 0; compounding = (typeof compounding !== "undefined") ? compounding : 1; period = (typeof period !== "undefined") ? period : 1; distribution = (typeof distribution !== "undefined") ? distribution : 1; infinity = (typeof infinity !== "undefined") ? infinity : 0; return (-pv - pmt * pvifga(rate, gradient, nper, pmt_deferred_by, atype, compounding, period, distribution, infinity) ) / pvif2(rate, nper, compounding, period, distribution); } </script>