Riemann's Zeta Function - another approach (RPL)
|
07-25-2017, 04:29 PM
(This post was last modified: 07-25-2017 04:45 PM by Dieter.)
Post: #61
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-25-2017 04:00 PM)Gerson W. Barbosa Wrote: If it is just a copy & paste matter, would you please provide a listing? Thanks! I am currently experimenting with some adjustments to squeeze out the best possible accuracy. Here is the latest version. It includes several measures to keep intermediate results with more digits than required by the final result. That's why the constant c0 in line 35 and 119 has been decreased by 0,57 (which is added back later) so that in effect this crucial value can be given to 12 decimals. Here is the listing: Code: 01 LBL "ZETA" The program uses a polynomial approximation for 0≤x<1, another one for 1<x≤2 and your original method for x>2. Line 03 and 07 generate an error if x<0 or x=1. The steps between LBL 98 and 99 add 1/(x–1) + 0,57 while trying to preseve as much accuracy as possible. This way e.g. Zeta(1,5) carries 12 digits (...7534869) before the last addition delivers the final result 2,612375349. Dieter |
|||
07-29-2017, 03:37 PM
Post: #62
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-25-2017 04:29 PM)Dieter Wrote: Here is the listing: Very nice! Now everything can be done in less than 30 seconds! Code:
"ZETA" in lines 04 and 16 is your program above. "GAM+1" in line 22 is your program here. 3 XEQ "Z" --> 1.202056903 (15.7 s) 2.001 R/S --> 1.643997513 (2) (17.4 s) 2 R/S --> 1.644934067 ( 4.7 s) 1.5 R/S --> 2.612375349 ( 4.8 s) 0.5 R/S --> -1.460354509 ( 5.4 s) 0 R/S --> -0.500000000 ( 4.7 s) -0.5 R/S --> -0.2078862248 (50) (15.4 s) -1 R/S --> -0.08333333322 (33) (14.6 s) -1.001 R/S --> -0.08316803706 (23) (27.4 s) -1.5 R/S --> -0.02548520184 (90) (27.3 s) -2 R/S --> 0.00000000000 (28.8 s) -3 R/S --> 0.008333333324 (33) (23.3 s) -5 R/S --> -0.003968253964 (8) (21.2 s) -7 R/S --> 0.004166666670 (67) (20.1 s) |
|||
07-30-2017, 07:57 AM
(This post was last modified: 07-30-2017 08:04 AM by Dieter.)
Post: #63
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-29-2017 03:37 PM)Gerson W. Barbosa Wrote: "ZETA" in lines 04 and 16 is your program above. "GAM+1" in line 22 is your program here. Ah yes, the Gamma thread. There were some more promising approaches with even better accuracy than GAM+1. ;-) BTW, I see your program has a RCL 00 in line 24. For x≤2 the ZETA routine leaves x in R00, but for x>2 R00 finally holds –x. Have you considered this? Anyway, since the results look fine for smaller and larger negative x the program must be working fine. ;-) BTW2, on 10-digit calculators 2 pi does not round very well, the last digit is 1 unit high. So I suggest to replace step 09/10 in your program with 360 D–R which returns the correct value 6,283185307. The same is true for pi/4 or pi/6 where 45 resp. 30 D–R yields ten correct digits. Dieter |
|||
07-30-2017, 01:43 PM
Post: #64
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
Good work Dieter!! I will type in your code and play with it.
Namir |
|||
07-30-2017, 04:17 PM
(This post was last modified: 07-30-2017 04:19 PM by Gerson W. Barbosa.)
Post: #65
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-30-2017 07:57 AM)Dieter Wrote: BTW, I see your program has a RCL 00 in line 24. For x≤2 the ZETA routine leaves x in R00, but for x>2 R00 finally holds –x. Have you considered this? Yes, that's what ABS in line 19 is for. (07-30-2017 07:57 AM)Dieter Wrote: BTW2, on 10-digit calculators 2 pi does not round very well, the last digit is 1 unit high. So I suggest to replace step 09/10 in your program with 360 D–R which returns the correct value 6,283185307. The same is true for pi/4 or pi/6 where 45 resp. 30 D–R yields ten correct digits. That's a good suggestion, but we'd need x! (or Gamma) to be that accurate too. Is there a math module with x! or Gamma? A few guard digits (perhaps just a couple of them) combined with built-in Gamma might give perfect 10-digit results most always, even when using 10-digits constants, which is quite impressive. On Free42: 3 XEQ "Z" --> 1.20205690313 (6) 2.001 R/S --> 1.64399751259 (24) 2 R/S --> 1.64493406685 1.5 R/S --> 2.61237534868 (9) 0.5 R/S --> -1.46035450879 (81) 0 R/S --> -0.50000000000 -0.5 R/S --> -0.207886224977 -1 R/S --> -0.0833333333333 -1.001 R/S --> -0.0831680372461 (281) -1.5 R/S --> -0.0254852018937 (898) -2 R/S --> 0.0000000000000 -3 R/S --> 0.00833333333191 (333) -5 R/S --> -0.00396825396801 (25) -7 R/S --> 0.00416666666663 (7) Code:
Code:
|
|||
07-30-2017, 10:03 PM
Post: #66
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-30-2017 04:17 PM)Gerson W. Barbosa Wrote: Or, slightly less inelegant, Code:
|
|||
07-30-2017, 10:18 PM
(This post was last modified: 07-30-2017 10:42 PM by Dieter.)
Post: #67
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-30-2017 04:17 PM)Gerson W. Barbosa Wrote:(07-30-2017 07:57 AM)Dieter Wrote: BTW, I see your program has a RCL 00 in line 24. For x≤2 the ZETA routine leaves x in R00, but for x>2 R00 finally holds –x. Have you considered this? I see, but the HP-41 version has is another RCL 00 without an ABS in line 24. ;-) (07-30-2017 04:17 PM)Gerson W. Barbosa Wrote: That's a good suggestion, but we'd need x! (or Gamma) to be that accurate too. Is there a math module with x! or Gamma? I do not know of an (official HP)-ROM with a full-precision 10-digit Mcode-Gamma-implementation. (07-30-2017 04:17 PM)Gerson W. Barbosa Wrote: A few guard digits (perhaps just a couple of them) combined with built-in Gamma might give perfect 10-digit results most always, even when using 10-digits constants, which is quite impressive. To assess the final accuracy it might be helpful to know the error of the two polynomial approxmations for x between 0 and 2. If evaluated with sufficient precision and using the coefficients given in the HP-41 program (note that c0 effectively has 12 digits since 0,57 is added later) the one for 0≤x<1 has a largest error of ~3,5 units in the 12th significant digit, while for 1<x≤2 it's less than 0,7 units. (07-30-2017 04:17 PM)Gerson W. Barbosa Wrote: On Free42: I tried Free42 BCD where Gamma seems to be good for 30+ digits. So the results should only be limited by the approximation error. However, for x>2 the number of terms (cf. line 38 ff. in the 42s Zeta program) of course has to be adjusted in a higher precision environment. ;-) This should improve the results for x>2 resp. x<–1. Dieter |
|||
07-31-2017, 12:31 AM
(This post was last modified: 07-31-2017 12:39 AM by Gerson W. Barbosa.)
Post: #68
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-30-2017 10:18 PM)Dieter Wrote:(07-30-2017 04:17 PM)Gerson W. Barbosa Wrote: Yes, that's what ABS in line 19 is for. Yes, but it's located after a call to your "GAM+1" program, which incidentally saves the argument in register 0 also. But you're not supposed to have to remember that after 3+ years. I'd failed to notice what your concern was about, sorry! (07-30-2017 10:18 PM)Dieter Wrote:(07-30-2017 04:17 PM)Gerson W. Barbosa Wrote: A few guard digits (perhaps just a couple of them) combined with built-in Gamma might give perfect 10-digit results most always, even when using 10-digits constants, which is quite impressive. This was just a quick test on Free42. I have yet to try it on the 42S, where some accuracy loss is expected, but not so much, I hope. Yes, the number of terms will have to be increased accordingly. Despite that, the running times will be better, since the 42S is about five times faster than the 41. Gerson. |
|||
07-31-2017, 03:59 PM
Post: #69
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-30-2017 10:18 PM)Dieter Wrote: I tried Free42 BCD where Gamma seems to be good for 30+ digits. So the results should only be limited by the approximation error. However, for x>2 the number of terms (cf. line 38 ff. in the 42s Zeta program) of course has to be adjusted in a higher precision environment. ;-) This should improve the results for x>2 resp. x<–1. I've tested it on Emu42 set to "Authentic Calculator Speed". The number of terms hasn't been adjusted yet, thus accuracy differences between both can be highlighted: 3 XEQ "ZETA" --> 1.20205690313 (6) (4.0 s) 2.001 R/S --> 1.64399751259 (24) (4.4 s) 2 R/S --> 1.64493406684 (5) (1.2 s) 1.5 R/S --> 2.61237534867 (9) (1.2 s) 0.5 R/S --> -1.46035450879 (81) (1.1 s) 0 R/S --> -0.500000000004 (0) (1.1 s) -0.5 R/S --> -0.207886224976 (7) (1.6 s) -1 R/S --> -0.0833333333333 (33) (1.5 s) -1.001 R/S --> -0.0831680372464 (281) (4.8 s) -1.5 R/S --> -0.0254852018936 (898) (4.7 s) -2 R/S --> 0.0000000000000 (4.4 s) -3 R/S --> 0.00833333333194 (333) (3.7 s) -5 R/S --> -0.00396825396798 (825) (3.3 s) -7 R/S --> 0.00416666666664 (7) (3.1 s) Code:
Your code (lines 027-159) is still intact :-) Gerson. |
|||
07-31-2017, 05:00 PM
(This post was last modified: 07-31-2017 05:14 PM by Dieter.)
Post: #70
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-31-2017 03:59 PM)Gerson W. Barbosa Wrote: I've tested it on Emu42 set to "Authentic Calculator Speed". The number of terms hasn't been adjusted yet, thus accuracy differences between both can be highlighted: Hmmm... x=0 should return exactly –0,5 because the coefficients are designed accordingly. So I wonder why you get –0,500000000004. This would mean that one of the coefficients is off by 4 E-12. ?!? BTW the optimized coefficient set has two slight changes in the last digit: line 123: -8.47149 E-7 line 131: 3.42683395 E-4 And the error check for x<0 (SQRT in line 29) can be omitted here. ;-) But remember, the two polynomial approximations are intended for 10 digit calculators. While the approximation for 1<x≤2 has an error less than 1 unit in the 12th digit and thus is useable for the 42s, the one for 0≤x<1 may be off by 4 ULP, so here one more term would make sense. Looking at your examples, indeed the largest error between –1 and +2 is 2 ULP. Dieter |
|||
07-31-2017, 06:31 PM
(This post was last modified: 07-31-2017 06:32 PM by Gerson W. Barbosa.)
Post: #71
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-31-2017 05:00 PM)Dieter Wrote:(07-31-2017 03:59 PM)Gerson W. Barbosa Wrote: I've tested it on Emu42 set to "Authentic Calculator Speed". The number of terms hasn't been adjusted yet, thus accuracy differences between both can be highlighted: I wonder what might have caused these differences. The coefficients were copied from your HP-41C listing: 43 -1.276ᴇ-8 18 -1.276 E-8 44 × 19 * 45 7.05133ᴇ-6 20 7.05133 E-6 46 - 21 - 47 × 22 * 48 9.721157ᴇ-5 23 9.721157 E-5 49 + 24 + 50 × 25 * 51 3.4243368ᴇ-4 26 3.4243368 E-4 52 - 27 - 53 × 28 * 54 0.00484515482 29 4.84515482 E-3 55 - 30 - 56 × 31 * 57 0.07281584288 32 7.281584288 E-2 58 + 33 + 59 × 34 * 60 0.007215664988 35 7.215664988 E-3 61 + 36 + 123 -8.4715ᴇ-7 102 -8.4715 E-7 124 × 103 * 125 7.51334ᴇ-6 104 7.51334 E-6 126 - 105 - 127 × 106 * 128 9.609657ᴇ-5 107 9.609657 E-5 129 + 108 + 130 × 109 * 131 3.42683396ᴇ-4 110 3.42683396 E-4 132 - 111 - 133 × 112 * 134 0.00484527616 113 4.84527616 E-3 135 - 114 - 136 × 115 * 137 0.07281583446 116 7.281583446 E-2 138 + 117 + 139 × 118 * 140 0.007215664464 119 7.215664464 E-3 141 + 120 + (07-31-2017 05:00 PM)Dieter Wrote: And the error check for x<0 (SQRT in line 29) can be omitted here. ;-) That was a blind copy, as you can see. (07-31-2017 05:00 PM)Dieter Wrote: But remember, the two polynomial approximations are intended for 10 digit calculators. While the approximation for 1<x≤2 has an error less than 1 unit in the 12th digit and thus is useable for the 42s, the one for 0≤x<1 may be off by 4 ULP, so here one more term would make sense. Looking at your examples, indeed the largest error between –1 and +2 is 2 ULP. This is good enough for me, at least for the time being. I will only double the number of terms, which is an easy thing to do, and see what I get. I'll leave the 42S as it is so anyone interested can improve it, starting by deleting line 29 :-) Thanks for your work on the two polynomial approximations which have made this fast enough for all arguments in the valid range. Gerson. |
|||
08-01-2017, 09:23 AM
(This post was last modified: 08-01-2017 04:01 PM by Dieter.)
Post: #72
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-31-2017 06:31 PM)Gerson W. Barbosa Wrote: I wonder what might have caused these differences. The coefficients were copied from your HP-41C listing: Could you check what the polynomial returns for x=0 at the point directly before LBL 98 ? Here the value should be exactly –0,07. But... since you use the reflection formula the approximation only has to cover the range from x=0,5 to 1. This can be done with one power less: Zeta(x) ~ 1/u + 0,577215664944 + 0,07281584734 u – 0,00484515533 u2 – 0,00034213951 u3 + 0,00009740462 u4 – 0,000005872685 u5 where u = x – 1 and 0,5 ≤ x < 1. Within the given domain this approximation has a largest error of ~0,3 units in the 12th significant digit. If you replace the 0...1 polynomial with this one be sure to set the last coefficient (constant term) to 0,007215664944 since the missing 0,57 is added later. On a 12-digit calculator you can even add two more digits at make it ...494433 while the u5 coefficient becomes ...72675. This way the error practically matches the theoretical optimum at ~0,27 ULP. Dieter |
|||
08-01-2017, 11:46 AM
(This post was last modified: 08-01-2017 12:04 PM by Dieter.)
Post: #73
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(07-31-2017 06:31 PM)Gerson W. Barbosa Wrote: I wonder what might have caused these differences. The coefficients were copied from your HP-41C listing: I just found that this might be the reason why your result for x=0 is not exactly –0,5 and others may be slightly off as well: for instance Zeta(0,5) and Zeta(2) should return the exact 12-digit values -1.46035450881 and 1,64493406685, actually Free42 returns even 13 correct digits here. On Free42 (and I suppose on a real hardware 42s) you cannot enter line 60 resp. 140 as the numbers are too long and the last digit is omitted. Could you check this please and try 7.215664988 E-3 resp. 7.215664464 E-3 here? BTW, I am now testing a Free42 version, essentially your code but with a new approximation for 0,5...1. The only problem is x=0 as the reflection formula would cause an attempt at calculating Zeta(1). Anyway, the results look quite promising once the number of terms for x>2 is sufficiently large. With about 200/x terms (a very rough estimate) the largest error I noticed for your examples above was 2 ULP. Dieter |
|||
08-01-2017, 12:34 PM
(This post was last modified: 08-01-2017 02:02 PM by Gerson W. Barbosa.)
Post: #74
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-01-2017 11:46 AM)Dieter Wrote:(07-31-2017 06:31 PM)Gerson W. Barbosa Wrote: I wonder what might have caused these differences. The coefficients were copied from your HP-41C listing: Bingo! Now I get -0.5 exactly. Actually, Free 42 accepts numbers with more than 30 digits. Have to leave now. Will comment later. Gerson. PS: Here is the table after the suggested modifications: 2 R/S --> 1.64493406685 1.5 R/S --> 2.61237534868 (9) 0.5 R/S --> -1.46035450879 (81) 0 R/S --> -0.500000000000 -0.5 R/S --> -0.207886224978 (7) -1 R/S --> -0.0833333333334 (3) 60 7.215664988E-3 123 -8.47149E-7 131 3.42683395E-4 140 7.215664464E-3 That was difficult to detect because Emu48 shows the lines 60 0.007215664988 140 0.007215664464 Yet they could not have been entered on the real 42S. The .RAW file I used was exported by Free42. From now on I'll take care when exporting Free42 .RAW files to Emu42. Code:
XEQ "T" --> 3.E-33 |
|||
08-01-2017, 04:54 PM
(This post was last modified: 08-01-2017 04:57 PM by Gerson W. Barbosa.)
Post: #75
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-01-2017 11:46 AM)Dieter Wrote: BTW, I am now testing a Free42 version, essentially your code but with a new approximation for 0,5...1. The only problem is x=0 as the reflection formula would cause an attempt at calculating Zeta(1). This is the formula I used in the previous program, but then only when x<0: \[\zeta(x)=2\cdot\left ( 2\pi \right )^{-(1-x)}\cdot \cos\left ( (1-x) \sin^{-1}(1)\right )\cdot \Gamma (1-x)\cdot \zeta (1-x)\] I remember I had to hard-code Zeta(0) = -1/2 here (line 116). Gerson. |
|||
08-02-2017, 11:19 AM
(This post was last modified: 08-02-2017 11:51 AM by Dieter.)
Post: #76
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-01-2017 04:54 PM)Gerson W. Barbosa Wrote: I remember I had to hard-code Zeta(0) = -1/2 here (line 116). The problem is any x sufficiently close to zero as 1–x may round to 1. This also seems to be a problem on the WP34s, cf. my post in the other forum. Here the polynomial approximation that goes down to x=0 has an advantage. In the meantime I have looked at the required number of terms for the iterative method (x>2). With about 400/x² + 10 terms the remaining error is roughly 2 units in the 13th digit which is as good as the best of the polynomial approximations. But this requires more than 100 terms. Then I found another quite effective method that requires less terms: n = 2*int(100/x^1,5 + 5) uses merely 80 terms at x=2 and has an error that can be easily compensated with a simple formula: for x<4 subtract 4,4 E–12*(4–x) from the final result. This should limit the error to less than ±1 unit in the 13th digit. And the correction can be done in just 7 steps. This can also be done for 10-digit accuracy, e.g. the HP-41 version. Here one may use n = 2*int(22/x + 4) terms and decrease the result for x<3 by 5 E–10*(3–x). This should limit the error to about one unit in the 11th digit, mostly even less. At least that's what can be achieved with sufficient arithmetic precision. On a physical HP-41 or a true emulator this does not make any difference as the correction is always less than 5 E–10 in a result >1. ;-) But I will change the number of terms to 2*int(24/x+3) and remove the limitation to n=22. Dieter |
|||
08-04-2017, 03:37 PM
Post: #77
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-02-2017 11:19 AM)Dieter Wrote:(08-01-2017 04:54 PM)Gerson W. Barbosa Wrote: I remember I had to hard-code Zeta(0) = -1/2 here (line 116). It appears the problem has been fixed on the WP34S. Without your testings, probably it would remain unnoticed for a long time. Back to the HP-41: Code:
Code:
ZETA, from line 29 on, is essentially your code. GAMMA uses a 10th degree polynomial approximation for the interval [1..2] and simple multiplications for x > 2, but a higher order polynomial might be necessary for 10-digit accuracy. Anyway, it can be replaced with better GAMMA implementations. Still, the ideal 30-second limit is surpassed only for large negative arguments, close to the end of the valid range: 3 XEQ ZETA --> 1.202056903 (15.6 s) 2.001 R/S --> 1.643997513 (2) (17.0 s) 2 R/S --> 1.644934067 ( 4.5 s) 1.5 R/S --> 2.612375349 ( 4.5 s) 0.5 R/S --> -1.460354509 ( 5.1 s) 0 R/S --> -0.500000000 ( 4.6 s) -0.5 R/S --> -0.2078862450 (250) (12.8 s) -1 R/S --> -0.08333333384 (33) (11.6 s) -1.001 R/S --> -0.08316803696 (723) (24.3 s) -1.5 R/S --> -0.02548520436 (190) (24.0 s) -2 R/S --> 0.00000000000 (23.6 s) -3 R/S --> 0.008333333384 (33) (20.7 s) -5 R/S --> -0.003968253990 (68) (19.3 s) -7 R/S --> 0.004166666686 (67) (18.4 s) -15.16 R/S --> 0.4964873534 (85) (18.5 s) -33.34 R/S --> -1.924684098E10 (152) (21.9 s) -41.42 R/S --> -3.506595602E16 (584) (24.1 s) -48.49 R/S --> -3.653091058E22 (22) (26.2 s) -58.59 R/S --> 1.136304829E32 (792) (29.0 s) -67.97 R/S --> 1.832460467E40 (1182) (31.4 s) |
|||
08-04-2017, 07:26 PM
(This post was last modified: 08-04-2017 08:15 PM by Dieter.)
Post: #78
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
[quote='Gerson W. Barbosa' pid='76831' dateline='1501861065']
Back to the HP-41: Code: 01▸LBL "ZETA" Just one remark: Testing condition1 OR condition2 can be done with a simple trick from the olden days. Simply have the inverse of condition1 followed by condition2. Code: 01▸LBL "ZETA" And the calculation of the number of terms should be replaced by this: Code: 64▸LBL 96 At the moment I am trying a Free42 version. Due to the 34-digit precision some things can be substantially simplified, e.g. most of the code following LBL 98 can be replaced by a simple x<>y 1/x + without all the stack acrobatics. And a result which usually returns 12 valid digits should be possible. Edit: here is the current version. It addresses the x~0 problem in a ...err... "creative" way in that the smallest |x| is set to 1E–20. #-) Please note that this version is intended for high-precision environments like Free42 and may not perform as well on a regular 42s. Code: 00 { 416-Byte Prgm } At least the results look quite good. Since x is returned in the upper display line you can see if a value very close to zero has been replaced by 1E–20. Dieter |
|||
08-05-2017, 04:36 AM
(This post was last modified: 08-05-2017 04:37 AM by Gerson W. Barbosa.)
Post: #79
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-04-2017 07:26 PM)Dieter Wrote: [quote='Gerson W. Barbosa' pid='76831' dateline='1501861065'] Code:
Lesson learned, thanks! I knew there was a better way, but I wouldn't remember. In the olden days I had no 41, but I did have a 15C which had all the 12 conditional tests, Gamma, complex mode and a few other thing the 41 lacked :-) (08-04-2017 07:26 PM)Dieter Wrote: Edit: here is the current version. It addresses the x~0 problem in a ...err... "creative" way in that the smallest |x| is set to 1E–20. #-) This has replaced what I had in Free42 (per Natural Selection). Gerson. |
|||
08-05-2017, 07:16 PM
(This post was last modified: 08-05-2017 09:56 PM by Dieter.)
Post: #80
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-05-2017 04:36 AM)Gerson W. Barbosa Wrote: I see you get the idea. ;-) (08-05-2017 04:36 AM)Gerson W. Barbosa Wrote: Lesson learned, thanks! I knew there was a better way, but I wouldn't remember. Starting quite exactly five years ago, this thread in the old forum may refresh your memories in this regard. (08-05-2017 04:36 AM)Gerson W. Barbosa Wrote: In the olden days I had no 41, but I did have a 15C which had all the 12 conditional tests, Gamma, complex mode and a few other thing the 41 lacked :-) Hmmm... then I think of a complete set of flag tests as provided by the '41. ;-) Here the old tricks may help for the one or other elegant solution in a 15C program. On the 67/97 I love things like F2? F2? for a FC?C test, or three consecutive tests for more obscure applications. Or even four, like in the linked thread. I think I remember there also was an artice in an HP Journal issue... (08-05-2017 04:36 AM)Gerson W. Barbosa Wrote: This has replaced what I had in Free42 (per Natural Selection). Fine. Let me know if you find any cases where – at least for x>0,5 – the 12th digit is off by more than 1 unit. I hope you don't. ;-) With the applied correction term (line 128 ff.) the error for x>2 should be less than 1 unit in the 13th place. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)