RE: HP48-HP50G : Error functions ERF(z), FRESNEL integrals, PROBIT, etc.
|
11-10-2023, 08:15 PM
(This post was last modified: 11-10-2023 08:52 PM by Gil.)
Post: #5
|
|||
|
|||
RE: HP48-HP50G : Error functions Erf(x), Erfc(x) & Erf/Erfc —>x
To shorten Joe Keith's code, instead of using the condition IF:
Modified J. Keith's Erf (x) : \<< DUP SIGN NEG 1 ROT SQ 2 * UTPC 1 - * \>> (40 bytes instead of 50 bytes —> space gain of 20%). Besides, evaluation time reduced by about 10%. "My" previously given version is still sortner and faster, but less accurate for x<0. To get the very same accuracy for x<0, I will have to work on the absolute value of x and multiply the result by sign(x): "My" modified Erf(x) would be: « DUP SIGN 0 .5 4 ROLL ABS UTPN -2 * 1 + *», which is then longer and slower than Joe Keith's modified version. As usual, Joe Keith always wins. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 23 Guest(s)