Accurate Normal Distribution for the HP67/97
|
12-14-2018, 02:43 AM
(This post was last modified: 12-19-2018 01:39 AM by Albert Chan.)
Post: #35
|
|||
|
|||
RE: Accurate Normal Distribution for the HP67/97
Another 1 Exp method, but correct from direct method: (Revision 2)
Example: Z(z = 20.3333 333333), using Emu48 B = z²/2 = 206.722 222222 D = exp(-B) / √(2 Pi) = 6.64644 886819 e-91, error = -303 ULP D is very close to true result, only linear correction is enough ! x = z rounded to 5 digits = 20.333 h = z - x = 0.0003 333333 Z(z) = D (B - x²/2 - x h - h²/2 + 1) = D * 1.00000 000046 = 6.64644 887125 e-91, error = +3 ULP Edit: if correction underflow is not an issue, D + D (B - x²/2 - x h - h²/2) may be more accurate. We get D + D * 45.5555 555 e-11 = 6.64644 887122 e-91, matched true result. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)