Post Reply 
(HP15C)(HP67)(HP41C) Bernoulli Polynomials
08-29-2023, 08:21 PM (This post was last modified: 08-29-2023 08:38 PM by Albert Chan.)
Post: #7
RE: (HP15C)(HP67)(HP41C) Bernoulli Polynomials
I just noticed B2(16, float(pi)) cheated with good B0(16) fraction.

Again XCas 1.9.0 default float used 48 bits, biased truncate rounding!
I wished XCas switch back to IEEE double default ...

XCas> float(B0(16))      /* good, exact B0(16) = -3617/510 */

-7.09215686275

XCas> B0(float(16))      /* bad, suffered massive cancellations */

-733244.429688



Perhaps B0(m) need asymptotic series formula ?
Ideas on getting accurate Bernoulli's number (with float, not exact) welcome.

Here's a test that does not use flawed B0(m).

XCas> float(B(15, pi))      → 640433.197324      /* reference */
XCas> B(15, float(pi))      → 594743.757812      /* massive cancellations */
XCas> B2(15, float(pi))    → 640433.197329      /* falling factorial form */

Update:

Last B2() still cheated from perfect Stirling's numbers. Redo with float m:

XCas> B2(15.0, float(pi))  → 640433.053861      /* falling factorial form */
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (HP15C)(HP67)(HP41C) Bernoulli Polynomials - Albert Chan - 08-29-2023 08:21 PM



User(s) browsing this thread: 1 Guest(s)