Showing posts with label exponents. Show all posts
Showing posts with label exponents. Show all posts

Monday, August 19, 2019

HP 41/DM41L and TI-60X: Exponentiation of Large Numbers

HP 41/DM41L  and TI-60X:  Exponentiation of Large Numbers

But Why a Program when we have Button?

This is true.  What this program does is allow for calculation of y^x when results in answers greater than 9.999999999 * 10^9.  The number is broken up into the form:

mantissa * 10^exponent

Let n = y^x.  Then:

n = y^x

Taking the logarithm of both sides:

log n = log (y^x)
log n = x log y

A number can be split into its fractional and integer part:

log n = frac(x log y) + int(x log y)

Take the antilog of both sides:

n = 10^( frac(x log y) + int(x log y) )
n = 10^( frac(x log y) ) * 10^( int(x log y) )

where
mantissa = 10^( frac(x log y) )
exponent = int(x log y)

HP 41/DM 41L Program BIGPOW

Input:
Y stack:  y
X stack:  x

Output:
Y:  mantissa (shown first)
X:  exponent

01 LBL T^BIGPOW
02 X<>Y
03 LOG
04 *
05 ENTER↑
06 FRC
07 10↑X
08 STOP
09 X<>Y
10 INT
11 RTN

TI-60 Program:  Big Powers

Input:
Store y in R1 and x in R2

Output:
R1 = mantissa (shown first), R2 = exponent

(Step,  Key Number, Key)
00, 71, RCL
01, 02, 2
02, 65, *
03, 71, RCL
04, 01, 1
05, 43, log
06, 95, =
07, 61, STO
08, 02, 2
09, 78, Frac
10, 12, INV
11, 43, log
12, 61, STO 
13, 01, 1
14, 13, R/S
15, 71, RCL
16, 02, 2
17, 79, Intg
18, 13, R/S
19, 22, RST

Examples

Example 1:  25^76.   y = 25, x = 76

Result: 
Mantissa = 1.75162308
Exponent = 106
25^76 ≈ 1.75162308 * 10^106

Example 2:  78^55.25,  y = 78, x = 55.25

Result:
Mantissa = 3.453240284
Exponent = 104
78^55.25 ≈ 3.543240284 * 10^104

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Tuesday, August 14, 2018

HP Prime and TI-84 Plus CE: Tetration, Iterated Exponentiation


HP Prime and TI-84 Plus CE: Tetration, Iterated Exponentiation

Introduction

Tetration is iterated exponentiation.  A common notation of tetration is the use of two upward arrows, known as Knuth’s up-arrow notation.  In general:

x y = x ^ x ^ x ^ … ^ x   (y times)

Take the x to its own power y times. 

For example:

2 2 = 2 ^ 2 ^ 2 = 2 ^ 4 = 16

3 2 = 3 ^ 3 ^ 3 = 3 ^ 27 = 7625597484987

 4 2 = 4 ^ 4 ^ 4 = 4 ^ 256 =
13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096
≈ 1.34078078079299 * 10^154

First, thank goodness that the HP Prime can handle really long integers in CAS mode.  Second, you can quickly see how fast the results grow in tetration calculations. 

In order to allow for a larger set of calculations, the programs are provided, where we break down the mantissa and exponents of each result. 

HP Prime Program TETRATION

EXPORT TETRATION(X,Y)
BEGIN
// 2018-08-14 EWS
LOCAL I,M,E,S;
// X^^Y, Y is an integer
M:=MANT(X);
E:=XPON(X);
FOR I FROM 1 TO Y DO
S:=M*ALOG(E)*LOG(X);
M:=ALOG(FP(S));
E:=IP(S);
END;
RETURN {M,E};
END;
  
TI-84 Plus CE Program TETRATION

"EWS 2018-08-14"
Disp "TETRATION X^^Y","Y: INTEGER"
Prompt X,Y
10^(fPart(X))→M
iPart(log(X))→E
For(I,1,Y)
M*10^(E)*log(X)→S
10^(fPart(S))→M
iPart(S)→E
End
Disp M,"*10^",E


Source:

“Knuth’s Up-Arrow Notation” Wikipedia.  Last edited August 9, 2018.  Retrieved August 14, 2018.  https://en.wikipedia.org/wiki/Knuth%27s_up-arrow_notation

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.

Sunday, August 14, 2016

Back to School: Survival Sheet for Algebra and Pre-Calculus (Trigonometry)

Back to School:  Survival Sheet for Algebra and Pre-Calculus (Trigonometry)

These are common topics found in algebra and pre-calculus classes.  You can download a pdf version of each.  I hope you find this helpful not only in classes but beyond.

Algebra:  https://drive.google.com/open?id=0B7R8x9Yi26yGQ1g4NzZOcm43Zm8

Pre-Calculus/Trigonometry:  https://drive.google.com/open?id=0B7R8x9Yi26yGem9sQ1JfSGplOWc

Algebra




Pre-Calculus/Trigonometry


This blog is property of Edward Shore, 2016.  

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...