Post Reply 
RE: HP48-HP50G : Error functions ERF(z), FRESNEL integrals, PROBIT, etc.
11-14-2023, 08:37 PM (This post was last modified: 11-14-2023 09:56 PM by Gil.)
Post: #25
RE: RE: HP48-HP50G : Error functions ERF(x or z), ERFC (x or z) & iERF/iERFc —>x
Again, a lesson...

Yes, I saw and appreciate the huge improvement for x very small.

Sorry for my ignorance, but I did not understand the code to try and adapt it to HP50G.

Unfortunately.

I try here
y = ierfc(1-x) -- assume good ierfc
With x=10^(-9) —> y=:x of Erfc: 8.86019642276E-10
local h = x - (x-1+1) —> should be zero?
return h==0 and y or y + sqrt(pi)/2 * exp(y*y) * h
But y small, y² very small & exp(y²) = 1
y=y+sqrt (pi)/2 *0 * 0 = y+0 = y
end
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
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 - Gil - 11-14-2023 08:37 PM



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