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.

Spotlight: Sharp EL-5200

  Spotlight: Sharp EL-5200 As we come on the 13 th (April 16) anniversary of this blog, I want to thank you. Blogging about mathematic...