Wednesday, September 6, 2017

Fun with the TI-80

Fun with the TI-80


TI-80 Program D2DMS - Decimal to Degrees-Minutes-Seconds

Variables:

Decimal Format:
D = decimal

DMS Format:
H = degrees/hours, M = minute, S = seconds

INPUT “DEC:”,D
IPART D→H
IPART (60*FPART D)→M
60 * FPART (60 * FPART D)→S
DISP “H,M,S:”,H,M,S

TI-80 Program DMS2D - Degrees-Minutes-Seconds to Decimal

Variables:

Decimal Format:
D = decimal

DMS Format:
H = degrees/hours, M = minute, S = seconds

INPUT “H:”,H
INPUT “M:”,M
INPUT “S:”,S
H + M/60 + S/3600 → D
DISP “DEC:”,D

TI-80 Program QUADRAT - Quadratic Equation

Variables:

A, B, C are coefficients of the equation Ax^2 + Bx + C, where the discriminant D:

D = B^2 – 4*A*C
If D≥0, then the roots are real and stored in X and Y.

If D<0, then the roots are complex and are in the form of conjugates X ± Yi.  X is the real part, Y is the imaginary part.



DISP “AX^2+BX+C=0”
INPUT “A:”,A
INPUT “B:”,B
INPUT “C:”,C
B^2 – 4AC → D
DISP D 
-B / (2A) → E
IF D≥0
THEN
E + √D/(2A) → X
E - √D/(2A) → Y
DISP “R1:”,X
DIPS “R2:”,Y
ELSE
E → X
√-D / (2A) → Y
DISP “RE:”,X
DISP “IM :”,Y
END

Annuity Factors

Variables:
I = periodic interest rate
N = number of payments/periods/deposits

TI-80 Program USFV – Annuity Future Value Factor

INPUT “I:”,I
INPUT “N:”,N
( (1+.01)^N – 1)/(.01I) → F
DISP F

TI-80 Program USPV – Annuity Present Value Factor

INPUT “I:”,I
INPUT “N:”,N
(1 – (1 + .01I)^-N)/(.01I) → P
DISP P

Two Dimensional Vector Operations

Let two vectors be defined as V1 = [A, B] an V2 = [C, D].  The program calculates the dot product, stored in E, norm of V1, stored in F, norm of V2, stored in G, and the angle between V1 and V2 in degrees, stored in H.

TI-80 Program VECTOR2

DEGREE
DISP “V1:”
INPUT A
INPUT B
DISP “V2:”
INPUT C
INPUT D
AC + BD → E
√(A^2 + B^2) → F
√(C^2 + D^2) → G
COS^-1 (E /(F*G)) → H
DISP “NORM V1:”, F
DISP “NORM V2:”, G
PAUSE
DISP “DOT:”, E
DISP “ANGLE:”, H

Simplistic Logistic Regression

Fit data (x,y) to the equation:

Y = 1 / (A + B*e^(-X))


TI-80 Program SIMPLOG

INPUT “L1:”, L1
INPUT “L2:”, L2
e^-L1 → L1
1/L2 → L2
LINREG(aX+b) L1, L2
a→A: b→B
DISP “1/(B+Ae^X)”,A,B
PAUSE
DISP “CORR^2”,r^2





Eddie


This blog is property of Edward Shore, 2017

No comments:

Post a Comment

HP Prime: Area by Quadratic Splines

HP Prime:  Area by Quadratic Splines Introduction The program QUADSUM calculates the area under the curve described by the set o...