English 中文(简体)
TI-84: Same formula, same inputs, different answers when using program v.s. home screen
原标题:

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
最佳回答

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).

问题回答

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)

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!





相关问题
Maths in LaTex table of contents

I am trying to add a table of contents for my LaTex document. The issue I am having is that this line: subsubsection{The expectation of (X^2)} Causes an error in the file that contains the ...

Math Overflow -- Handling Large Numbers

I am having a problem handling large numbers. I need to calculate the log of a very large number. The number is the product of a series of numbers. For example: log(2x3x66x435x444) though my actual ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Subsequent weighted algorithm for comparison

I have two rows of numbers ... 1) 2 2 1 0 0 1 2) 1.5 1 0 .5 1 2 Each column is compared to each other. Lower values are better. For example Column 1, row 2 s value (1.5) is more ...

热门标签