(06-27-2017 05:47 PM)Dieter Wrote: (06-27-2017 01:26 AM)Gerson W. Barbosa Wrote: On the classic HP-15C:
Gerson, what about a program listing ?-)
Here it is:
Code:
[code]# --------------------------------------------
# HEWLETT·PACKARD 15C Simulator program
# Created with version 3.4.01
# --------------------------------------------
# --------------------------------------------
000 { }
001 { 42 21 11 } f LBL A
002 { 44 3 } STO 3
003 { 1 } 1
004 { 30 } -
005 { 43 11 } g x²
006 { 11 } √x̅
007 { 48 } .
008 { 0 } 0
009 { 4 } 4
010 { 34 } x↔y
011 { 43 10 } g x≤y
012 { 22 1 } GTO 1
013 { 45 3 } RCL 3
014 { 36 } ENTER
015 { 36 } ENTER
016 { 1 } 1
017 { 48 } .
018 { 3 } 3
019 { 16 } CHS
020 { 14 } y^x
021 { 7 } 7
022 { 5 } 5
023 { 20 } ×
024 { 1 } 1
025 { 40 } +
026 { 43 44 } g INT
027 { 36 } ENTER
028 { 40 } +
029 { 44 25 } STO I
030 { 44 2 } STO 2
031 { 34 } x↔y
032 { 16 } CHS
033 { 44 1 } STO 1
034 { 0 } 0
035 { 44 0 } STO 0
036 { 42 21 0 } f LBL 0
037 { 45 25 } RCL I
038 { 45 1 } RCL 1
039 { 14 } y^x
040 { 44 30 0 } STO - 0
041 { 1 } 1
042 { 44 30 25 } STO - I
043 { 45 25 } RCL I
044 { 45 1 } RCL 1
045 { 14 } y^x
046 { 44 40 0 } STO + 0
047 { 42 5 25 } f DSE I
048 { 22 0 } GTO 0
049 { 45 1 } RCL 1
050 { 36 } ENTER
051 { 40 } +
052 { 1 } 1
053 { 30 } -
054 { 45 2 } RCL 2
055 { 43 11 } g x²
056 { 2 } 2
057 { 4 } 4
058 { 20 } ×
059 { 10 } ÷
060 { 1 } 1
061 { 45 30 1 } RCL - 1
062 { 45 2 } RCL 2
063 { 8 } 8
064 { 20 } ×
065 { 10 } ÷
066 { 48 } .
067 { 5 } 5
068 { 40 } +
069 { 45 40 2 } RCL + 2
070 { 45 1 } RCL 1
071 { 14 } y^x
072 { 2 } 2
073 { 10 } ÷
074 { 45 40 0 } RCL + 0
075 { 2 } 2
076 { 45 1 } RCL 1
077 { 16 } CHS
078 { 14 } y^x
079 { 36 } ENTER
080 { 36 } ENTER
081 { 2 } 2
082 { 30 } -
083 { 10 } ÷
084 { 20 } ×
085 { 43 32 } g RTN
086 { 42 21 1 } f LBL 1
087 { 45 3 } RCL 3
088 { 1 } 1
089 { 30 } -
090 { 15 } 1/x
091 { 43 36 } g LSTx
092 { 48 } .
093 { 9 } 9
094 { 43 36 } g LSTx
095 { 20 } ×
096 { 1 } 1
097 { 3 } 3
098 { 48 } .
099 { 7 } 7
100 { 3 } 3
101 { 3 } 3
102 { 4 } 4
103 { 4 } 4
104 { 40 } +
105 { 10 } ÷
106 { 48 } .
107 { 5 } 5
108 { 7 } 7
109 { 7 } 7
110 { 2 } 2
111 { 1 } 1
112 { 5 } 5
113 { 6 } 6
114 { 7 } 7
115 { 40 } +
116 { 40 } +
117 { 43 32 } g RTN
118 { 42 21 12 } f LBL B
119 { 48 } .
120 { 5 } 5
121 { 34 } x↔y
122 { 43 30 0 } g TEST x≠0
123 { 22 2 } GTO 2
124 { 34 } x↔y
125 { 16 } CHS
126 { 43 32 } g RTN
127 { 42 21 2 } f LBL 2
128 { 43 10 } g x≤y
129 { 22 3 } GTO 3
130 { 32 11 } GSB A
131 { 43 32 } g RTN
132 { 42 21 3 } f LBL 3
133 { 1 } 1
134 { 34 } x↔y
135 { 30 } -
136 { 44 4 } STO 4
137 { 32 11 } GSB A
138 { 43 26 } g π
139 { 36 } ENTER
140 { 40 } +
141 { 45 4 } RCL 4
142 { 14 } y^x
143 { 10 } ÷
144 { 1 } 1
145 { 45 30 4 } RCL - 4
146 { 43 26 } g π
147 { 20 } ×
148 { 2 } 2
149 { 10 } ÷
150 { 43 8 } g RAD
151 { 23 } SIN
152 { 20 } ×
153 { 1 } 1
154 { 16 } CHS
155 { 45 40 4 } RCL + 4
156 { 42 0 } f x!
157 { 20 } ×
158 { 36 } ENTER
159 { 40 } +
160 { 43 32 } g RTN
# --------------------------------------------
(06-27-2017 05:47 PM)Dieter Wrote: Finally, here are some optimized simple approximations for 1 < x ≤ 1,01.
With u = x–1:
...
Zeta(x) ~ 1/u + u/(0,9 · u + 13,733437) + 0,5772156664
(error less than ±1 unit in the 12th significant digit)
The mentioned error bounds assume exact evaluation, i.e. with more digits than the target accuracy. Otherwise the resulting errors may be slightly larger.
That's what I'd been using, with your previous constants. As you've pointed out, we'd need more digits to take full advantage of that. Two extra digits as on the HP-12C Platinum would be nice. HP not truncating intermediate results to the number of digits in the display, at least when running a program, would also help. The simulator gives more accurate results, however.
Thanks again for your valuable suggestions and improvements!
Gerson.
Edited to remove attached file.