TI-84:使用程序与主屏幕时相同的公式、相同的输入、不同的答案

发布于 2024-10-30 07:42:23 字数 716 浏览 1 评论 0原文

我想在 TI-Basic 中编写一个简单的公式来计算 TI-84 计算器的复利。复利的公式为A = P(1+(r/n))^(n)(t),其中p是本金,r 是利率(以小数表示),n 是本金复利的次数,t 是时间量,>a 是您添加利息后的最终金额。

当我设置变量(见下文)并在计算器主屏幕上准确输入公式时,我得到$7332.86,这是正确的答案。

但是,当我设置变量并以程序形式输入公式时(见下文),我得到 $42684.69,这是正确的。

我已经在 2 个不同的 TI-84 计算器上尝试过这个程序,并且得到了相同的结果,所以这不是我的计算器的问题。

老实说,我很困惑。我不知道为什么会发生这种情况,所以如果你擅长数学,知道如何编写 ti 系列计算器,或者只是看到我遗漏的错误,请告诉我,因为这件事一直让我发疯!

具有相同输入和公式的程序,但给出的答案与在主屏幕上使用时不同:

: 2000 -> P
: 0.065 -> R
: 54 -> N
: 20 -> T
: P(1+(R/N))^(N)(T) -> A
: Disp A

I wanted to write a simple formula in TI-Basic to calculate compound interest for my TI-84 calculator. The formula for compound interest is A = P(1+(r/n))^(n)(t) where p is the principal amount, r is the interest rate (expressed as a decimal), n is the number of times the principal is compounded, t is the amount of time, and a is your final amount with interest added.

When I set variables (see below) and and type the formula in exactly how it is above on my calculators home screen, I get $7332.86, which is the correct answer.

However, when I set the variables and type the formula in as a program (see below), I get $42684.69, which is not correct.

I have tried this program on 2 different TI-84 calculators and I have gotten the same results, so it is not something with my calculator.

I am honestly stumped. I have no idea why this is happening, so if you are good at math, know how to program a ti series calculator, or just see a mistake that I am missing, please tell me because this thing has been driving me crazy!

Program with same inputs and formula but gives different answer than when used on the home screen:

: 2000 -> P
: 0.065 -> R
: 54 -> N
: 20 -> T
: P(1+(R/N))^(N)(T) -> A
: Disp A

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

隔岸观火 2024-11-06 07:42:23

我不完全知道您面临的问题是什么,但我认为您的程序应该如下所示:

Prompt P
Prompt R
Prompt N
Prompt T

Disp P(1+(R/N))^(NT)

编辑

我认为您需要一组额外的括号。 ^(N)(T) 仅求 N 次方,然后乘以 T。尝试 ^((N)(T)) 或简单地 ^(NT)

I don't exactly know what the problem you are facing is, but I think your program should look like this:

Prompt P
Prompt R
Prompt N
Prompt T

Disp P(1+(R/N))^(NT)

EDIT

I think you need an extra set of parentheses. ^(N)(T) only raises to the power of N, and then multiplies by T. Try ^((N)(T)) or simply ^(NT).

ぽ尐不点ル 2024-11-06 07:42:23

你的公式相当于T*P*((1+(R/N))^(N)),这显然是错误的。这样做的原因是因为操作顺序。尝试P*(1+(R/N))^(T*N)

You're formula is equivalent to T*P*((1+(R/N))^(N)), which is obviously wrong. The reason it's doing this is because of the order of operations. Try P*(1+(R/N))^(T*N)

删除→记忆 2024-11-06 07:42:23

代码的较短版本(如果您想节省内存空间):

:promptP,R,N,T

:Disp P(1+(R/N))^(NT)

快乐编码!

A shorter version of the code (if you want to conserve memory space):

:promptP,R,N,T

:Disp P(1+(R/N))^(NT)

Happy coding!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文