Computing 208 Decimal Digits Of e

Description

by Valentin Albillo (PDF)

Quote: "This 64-step program will compute from 8 to 208 decimal places of Euler’s constant, the well-known transcendental number e = 2.71828. It is by no means optimized for performance but tries instead to be as short and straightforward as possible. Although you can compute more decimal places in an HP-15C, for the purposes of this article this simpler program will do nicely."


Press CF 8 to clear complex mode
Reduce number of registers 2 f DIM (i)
Now, enter the number of 8 digit blocks you want to use - 1 to 26
Start program GSB A

Program Resources

Labels

Name Description
 A Program Start
 0 - internal use -
 1 - internal use -
 2 - internal use -
 3 - internal use -
 4 - internal use -
 5 - internal use -

Storage Registers

Name Description
 0 Row index for matrix elements
 2 Column index for matrix elements
I Current divisor (2, 3, ...)

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 022 42,21, 3 f LBL 3 044 22 5 GTO 5
001 42,21,11 f LBL A 023 45 11 RCL A 045 42 44 f FRAC
002 42,16, 0 f MATRIX 0 024 43 20 g x=0 046 16 CHS
003 42,16, 1 f MATRIX 1 025 42, 6, 2 f ISG 2 047 43 32 g RTN
004 1 1 026 42,21, 0 f LBL 0 048 42,21, 5 f LBL 5
005 42,23,11 f DIM A 027 45 11 RCL A 049 42 44 f FRAC
006 42,23,12 f DIM B 028 45,10,25 RCL ÷ I 050 45 12 RCL B
007 42,26,12 f RESULT B 029 43 44 g INT 051 43 44 g INT
008 44 2 STO 2 030 u 44 11 USER STO A 052 45 36 RCL RAN #
009 44 25 STO I 031 22 2 GTO 2 053 20 ×
010 26 EEX 032 45 25 RCL I 054 40 +
011 8 8 033 42 31 f PSE 055 31 R/S
012 44 11 STO A 034 45,16,11 RCL MATRIX A 056 22 4 GTO 4
013 15 1/x 035 42,16, 7 f MATRIX 7 057 42,21, 2 f LBL 2
014 44 36 STO RAN # 036 43,30, 0 g TEST x≠0 058 45,20,25 RCL × I
015 42,21, 1 f LBL 1 037 22 1 GTO 1 059 30
016 45,16,11 RCL MATRIX A 038 45,16,12 RCL MATRIX B 060 45 36 RCL RAN #
017 45,16,12 RCL MATRIX B 039 45 36 RCL RAN # 061 10 ÷
018 40 + 040 20 × 062 44,40,11 STO + A
019 45 2 RCL 2 041 42, 7, 8 f FIX 8 063 45 11 RCL A
020 44 0 STO 0 042 42,21, 4 f LBL 4 064 22 0 GTO 0
021 42, 6,25 f ISG I 043 u 45 12 USER RCL B