-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hello,
I was studying your paper and I noticed that there are some typos in the simple interest vs compound interest example in the graphic on the readme and in figure 1 in your paper on arxiv: https://arxiv.org/pdf/2211.12588. The answer that you are claiming is correct is actually incorrect. I performed the calculation using three different solving techniques and each time came up with a rate of about 12.646198272705078%.
Here is a sample program (actually produced by github copilot using your exact prompt) that finds the correct answer:
def find_interest_rate(P, T, N, diff):
def f(R):
return P * (1 + R/N)**(N*T) - P - P*R*T - diff
a, b = 0, 1
while abs(b - a) >= 1e-6:
c = (a + b) / 2
if f(c) == 0:
break
elif f(a) * f(c) < 0:
b = c
else:
a = c
return c
P = 20000 # principal amount
T = 3 # time in years
N = 1 # number of times interest is compounded per year
diff = 1000 # difference between compound interest and simple interest
R = find_interest_rate(P, T, N, diff)
print(f"The interest rate is {R * 100}%")
There are also some typos in the paper related to this example in the paragraph right after the heading 2.2 Program of Thoughts. In some places the paper refers to a 2 year period and in others it refers to a 3 year period. (By the way I did check the calculation using a 2 year period and that also does not match the number that is in the graphic.)
Thanks!