CS代写 Compound quarterly, monthly, daily, etc.

Compound quarterly, monthly, daily, etc.
interest rate: 5%
Number drop down..??
And if you do it 1000000 times, Number doesn¡¯t increase? UNSTABLE ALGO!

Copyright By PowCoder代写 加微信 powcoder

~= ¾ÍÊÇ!= in matlab
n! start to overweight x^n, term start to decrease

When add 21nd term, make no difference, so program stop
Let¡¯s try 10
Let¡¯s try -5
Have cancellation for alternation of sigh
Not too bad(4 digits)
relative error should be around 10^-4
Let¡¯s calculate…the relative error!!

Calculate relative error for e^5:
Around 7(digits of accuracy)
Try e^(1/10)
Very simple fix
No digits of accuracy here…our algo doesn¡¯t really work for negative exponent
Error here is caused by cancellation
Largest term, abs error around 0.00001, 2755.73.. next digit might be right or wrong, but next digit lose accuracy
The accumulation of error would be extended in the end
Error is swampping the answer. This is unstable algo since we introduced cancellation.
Is there simple fix? Yes! Instead of -10, do 1/10

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com