TI-Basic Vault

"Some of the most elegant, compact, speedy and accurate math programs available for the TI-83 Plus." –Weregoose

Concepts

Arithmetic-Geometric Mean

Description

Computes the arithmetic-geometric mean of two real numbers.

Example

{1,2:prgmAGM 1.456791031

Program

PROGRAM:AGM

:While variance(Ans

:{mean(Ans),√(prod(Ans

:End

:min(Ans

Download

Base Converter

Description

Translates integers between different bases (2–35).

Example

{16,10:prgmBASECONV
?7C
124

{30,32:prgmBASECONV
?132FILL
NUMBER

Program

PROGRAM:BASECONV

:Input Str1

:AnsA

:Ans(2A

:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZStr2

:length(Str1

:sum(seq(LA(1)^(Ans-A)(inString(Str2,sub(Str1,A,1))-1),A,1,AnsB

:" // one space

:For(C,1,log(AB+1)/log(A

:sub(Str2,int(E5×√2+AfPart(B/A^C)),1)+Ans

:End

:Ans

Download

Binomial Theorem

Description

Lists the coefficients of (Ax+By)^C in expanded form.

Example

1A:2B:3C:prgmBINOMIAL {1 6 12 8}

‾3.2A:4.5B:2C:prgmBINOMIAL {10.24 ‾28.8 20.25}

Program

PROGRAM:BINOMIAL

:A^Cseq(C nCr D(B/A)^D,D,0,C

Download

Bernoulli Number

Description

Lists the first 22 Bernoulli numbers.

Example

prgmBERNOULI {1 ‾1/2 1/6 0 ‾1/30 0 1/42 0 ‾1/30 0 5/66 0 ‾691/2730 0 7/6 0 ‾3617/510 0 43867/798 0 ‾174611/330 0}

Program

PROGRAM:BERNOULI

:{1

:For(A,2,22

:augment(Ans,{‾A‾¹sum(AnsA nCr cumSum(not(not(Ans-1

:End

:Ansabs(1<43abs(AnsFrac

Download

Completing the Square

Description

Transforms the polynomial Ax²+Bx+C into A(x+B′)²+C′.

Example

2A:4B:5C:prgmCTSQUARE {2 1 3}

1A:‾5B:6C:prgmCTSQUARE {1 ‾5/2 ‾1/4}

Program

PROGRAM:CTSQUARE

:.5B/A

:{A,Ans,C-AAns²Frac

Download

Double Factorial

Description

Computes the double factorial of an integer.

Example

8:prgmDBLFACT 384

{1,7,13:prgmDBLFACT {1 105 135135}

Program

PROGRAM:DBLFACT

:.5Ans

:int(2^AnsAns!(2/π)^fPart(Ans

Download

Euclidean Algorithm

Description

Computes the greatest common divisor of two real numbers.

Example

12A:90B:prgmGCD 6

‾5.36A:7.84B:prgmGCD .08

Program

PROGRAM:GCD

:A+Bi

:While real(round(Ans,8

:Ansi+real(AnsiPart(imag(Ans/real(Ans

:End

:abs(A/iPart(A/Ans

Download

Euler Zigzag Number

Description

Computes the secant numbers for even inputs and tangent numbers for odd inputs.

Example

8:prgmEULERZG 1385

13:prgmEULERZG 22368256

Program

PROGRAM:EULERZG

:AnsA

:{1

:For(A,2,A

:augment(Ans,{max(Ans

:cumSum(seq(Ans(A-B),B,1,A-1

:End

:max(Ans

Download

Fibonacci Number

Description

Computes the nth Fibonacci number.

Example

30:prgmFIBNACCI 832040

{10,11,12:prgmFIBNACCI {55 89 144}

Program

PROGRAM:FIBNACCI

:int(round(√(.8)cosh(Anssinh‾¹(.5

Download

Fraction Converter

Description

Lists the numerator and denominator of the input.

Example

.14632:prgmTOFRAC {1829 12500}

πe:prgmTOFRAC {3999687 468362}

42315/60:prgmTOFRAC {2821 4}

Program

PROGRAM:TOFRAC

:AnsA

:{1,0A

:abs(AB

:0

:Repeat not(A-Ans‾¹round(AnsA,0

:{Ans,Ansint(B)+LA(1A

:If fPart(B

:1/fPart(BB

:max(LA

:End

:round(Ans{A,1

Download

Gamma Function

Description

Evaluates the gamma function for real-valued inputs.

Example

5:prgmGAMMA 24

17/3:prgmGAMMA 68.65322228

‾.0340274496387:prgmGAMMA ‾30

Program

PROGRAM:GAMMA

:AnsA

:9+abs(Ans

:Ans^Ans/prod(seq(A,A,Ans-9,Ans))√(2πAns/e^(2Ans-1/(6Ans+1/(5Ans+53/(42Ans+22/Ans

:If A<0

:‾π/(AnsAsin(πAr

:Ans

Download

Heron's Formula

Description

Computes the area of a triangle given three side lengths.

Example

{51,52,53:prgmHERON 1170

{9,18,24:prgmHERON 68.79998183

Program

PROGRAM:HERON

:√(sum(.5Ans)prod(sum(.5Ans)-Ans

Download

Lambert W Function

Description

Computes an A for which Ae^A equals the input.

Example

‾1/e:prgmLAMBERTW ‾1

‾.5π:prgmLAMBERTW 1.570796327i

72+640i/3:prgmLAMBERTW 4.000137616+1.000267067i

Program

PROGRAM:LAMBERTW

:AnsA

:DelVar Bi

:While abs(Ans-B) and 1+real(B

:AnsB

:(AAns+A)/(A+e^(Ans

:End

:Ans

Download

Mode Calculator

Description

Lists the mode(s) of a list of two or more real numbers.

Example

{5.5,4.7,5.2,5.1,4.7:prgmMODE {4.7}

{0,‾7,‾2,0,‾8,1,10,9,8,‾2,9:prgmMODE {9 0 ‾2}

Program

PROGRAM:MODE

:AnsA

:1+max(abs(AnsA

:LA+Ans

:While max(Ans

:AnsB

:SortD(LB

:LBaugment({0},not(ΔList(LB

:End

:sum(LB xor 0dim(LB

:LB-A

Download

Modular Exponentiation

Description

Computes B^E (mod M) for positive integer inputs.

Example

5B:125E:75M:prgmMODEXP 50

880B:268E:143M:prgmMODEXP 22

Program

PROGRAM:MODEXP

:1C

:While Ans

:If fPart(.5E

:BC-Mint(BC/MC

:B²-Mint(B²/MB

:int(.5EE

:End

:C

Download

Quadratic Formula

Description

Lists the roots of Ax²+Bx+C=0.

Example

1A:3B:2C:prgmQUADFORM {‾2 ‾1}

.08A:‾.04B:.01C:prgmQUADFORM {.25-.25i .25+.25i}

Program

PROGRAM:QUADFORM

:‾2C/(B+{‾1,1}√(B²+4ACi²

Download

Simplifying Square Roots

Description

Lists the coefficient and radicand of the simplified form of the input.

Example

√(12:prgmSIMPROOT {2 3}

√(63)√(21:prgmSIMPROOT {21 3}

Program

PROGRAM:SIMPROOT

:For(A,int(Ans),1,‾1

:If fPart(round(Ans²/A²

:End

:{A,Ans²/A²

Download

Square Root Approximation

Description

Lists an A and B for which √(A)+B is close to the input.

Example

27.36278175:prgmNEARSQRT {5985 ‾50}

tan(πr/8:prgmNEARSQRT {2 ‾1}

Program

PROGRAM:NEARSQRT

:AnsA

:fPart(AnsB

:1/fPart(Ans‾¹C

:BAns

:While fPart(round(Ans,4

:C+Ans

:End

:B+round(.5Ans/B,0

:{Ans²,A-Ans

Download

Triangle Solver

Description

Computes the remaining possible sides and angles of a triangle given three known (nonzero) measurements.

Example

{27.1,30.5,0L1:{34°,0,0L2:prgmTRISOLVE

Triangle
 a=27.1
 b=30.5
 c=46.34565289
 A=34
 B=39.00217905
 C=106.9978209

Second Triangle
 a=27.1
 b=30.5
 c=4.225639036
 A=34
 B=140.9978209
 C=5.002179051

Program

PROGRAM:TRISOLVE

:If 3≠sum(not(augment(L1,L2

:Return

:DelVar Aa+bi

:not(L1)(L2+not(L2)(πr-sum(L2

:If max(L1

:max(L1)sin(Ans)/sin(sum(Ans+min(L1

:If 2=sum(not(Ans

:√(sum(L1²)-prod(L1+2not(L1)cos(max(L2

:If min(L1) or max(L1 and L2)≠sum(not(L1

:Then

:Goto 0

:End

:For(B,‾1,1,2

:max(L1not(L2

:Anscos(L2)-B√(L1²-Ans²sin(L2)²

:max(Ansnot(not(L2

:Lbl 0

:L1+Ansnot(L1

:If min(real(Ansnot(imag(Ans

:Then

:If sum(Ans)<2max(Ans

:Return

:If A

:Pause

:ClrHome

:Disp sub("Second Triangle",8-7A,7A+8

:For(C,0,1

:If C

:cos‾¹(Ans/prod(Ans)(.5sum(Ans²)-Ans²

:For(D,1,3

:Disp " "+sub("abcABC",3C+D,1)+"=

:Output(3C+D+1,4,Ans(D

:End

:End

:IS>(A,2

:End

:End

Download

von Staudt-Clausen Theorem

Description

Computes the denominator of the nth Bernoulli number.

Example

6:prgmBERND 42

500:prgmBERND 8365830

Program

PROGRAM:BERND

:AnsA

:{1

:For(B,1,A

:If not(fPart(A/B

:augment(Ans,1+B{1=max(gcd(B+1,seq(A,A,1,B

:End

:prod(Ansnot(1<AfPart(.5A

Download

Backlinks

Send me an e-mail if you have a link pointing here, and I'll point back if it's to related material.

Copyright and Contact Information

Site design is copyright © 2011 Kenneth "Weregoose" Hammond.

Send a message to: weregoose@gmail.com.