(12C+) Bernoulli Number
|
08-30-2023, 09:46 PM
(This post was last modified: 08-30-2023 10:58 PM by Albert Chan.)
Post: #10
|
|||
|
|||
RE: (12C+) Bernoulli Number
(07-28-2019 11:21 AM)John Keith Wrote: EDIT: I tried your program as well as the Akiyama-Tanigawa method as used in the third program here on the HP-48G and both methods fail due to catastrophic rounding error for n>10. If we use scaled numbers, we can push it a bit more. Example, this is Akiyama-Tanigawa method, scaled by denominator LCM. Note: XCas 1.9.0 default float now is 48 bits, truncated rounding. Note: round(L[0]) does not change L[0] value, just its type, real → integer. XCas> m := 22; XCas> h := lcm(range(2, m+2)) → 5354228880 XCas> L := float(h ./ range(2, m+2)) XCas> for(k:=2; k<=m; k++) { L := -deltalist(L) .* range(1,len(L)); if (even(k)) print(k, round(L[0])/h); }; 2, 1/6 4, -1/30 6, 1/42 8, -1/30 10, 5/66 12, -691/2730 14, 7/6 16, -3617/510 18, 43867/798 20, -174611/330 22, 854513/138 48 bits float mangaged to get upto B(22) IEEE double can reach B(24), all exact fractions. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C+) Bernoulli Number - Gamo - 07-27-2019, 06:41 AM
RE: (12C+) Bernoulli Number - Albert Chan - 07-27-2019, 12:41 PM
RE: (12C+) Bernoulli Number - Gamo - 07-27-2019, 01:40 PM
RE: (12C+) Bernoulli Number - John Keith - 07-27-2019, 07:49 PM
RE: (12C+) Bernoulli Number - Albert Chan - 07-28-2019, 12:02 AM
RE: (12C+) Bernoulli Number - John Keith - 07-28-2019, 11:21 AM
RE: (12C+) Bernoulli Number - Albert Chan - 08-30-2023 09:46 PM
RE: (12C+) Bernoulli Number - Albert Chan - 09-11-2023, 03:48 PM
RE: (12C+) Bernoulli Number - Albert Chan - 07-28-2019, 01:08 AM
RE: (12C+) Bernoulli Number - Gamo - 07-28-2019, 02:29 AM
RE: (12C+) Bernoulli Number - Albert Chan - 07-31-2019, 05:14 PM
RE: (12C+) Bernoulli Number - Albert Chan - 09-12-2023, 05:59 PM
|
User(s) browsing this thread: 1 Guest(s)