Post Reply 
RE: HP48-HP50G : Error functions ERF(z), FRESNEL integrals, PROBIT, etc.
11-14-2023, 10:50 PM
Post: #27
RE: RE: HP48-HP50G : Error functions ERF(x or z), ERFC (x or z) & iERF/iERFc —>x
(11-14-2023 08:37 PM)Gil Wrote:  I try here
y = ierfc(1-x) -- assume good ierfc
With x=10^(-9) —> y=:x of Erfc: 8.86019642276E-10

This is very bad ierfc, only 3 digits accuracy, with exact input!
Perhaps UTPN is not so accurate after all?

ierf(1e-9) ≈ sqrt(pi)/2 * 1e-9 ≈ 8.86226925452758e-10 (all digits correct!)

Quote:function erf_taylor(x)
local y = 1 - erfc(x) -- assume good erfc
—>y=.000000001128 on HP50G
return h==0 and y or y + 2/sqrt(pi) * exp(-x*x) * h
h=10^(-9)-8.86019642276E-10
But X small, x² very small, exp x² = 1 & exp (-x²) =1
—> y=y+2/sqrt(pi)*0*0=y+0=y

Let's start from your y, but this time use a good ierf

lua> x, y = 1e-9, .000000001128
lua> dydx = 2/sqrt(pi) * exp(-x*x)
lua> h = x - ierf(y)
lua> y + dydx * h
1.1283791670955127e-09
lua> erf(x)
1.1283791670955127e-09
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RE: HP48-HP50G : Error functions ERF(x or z), ERFC (x or z) & iERF/iERFc —>x - Albert Chan - 11-14-2023 10:50 PM



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