Post Reply 
RE: HP48-HP50G : Error functions ERF(z), FRESNEL integrals, PROBIT, etc.
12-21-2023, 11:50 AM (This post was last modified: 12-21-2023 01:34 PM by Gil.)
Post: #45
RE: RE: HP48-HP50G : Error functions ERF(x or z), ERFC (x or z) & iERF/iERFc —>x

New version 11c


Slight changes (uniformization) in the DOERR messages.

Subroutine inv¦z was completed (in bold) for special cases.

The rest remains mostly the same for the functions
ERF & ERFc, their inverse INV¦ & INV¦c
& PROBIT ERFi iERFc ERFcx FADDEEVA DAWSON according to Wolfram Alpha or Wikipedia definitions.

As previously, all of them take a single argument input and accept, as argument input, a real or complex number, according to the explanation given at the beginning of each function.

inv¦z
\<<
DO 9 \-> p z \<-max.z
\<< z DUP ERF 4 ROLLD 3 DROPN p - DUP \-> f
\<< '2/\v/\pi*EXP(-z^2)+f*z' / - \->NUM DUP DUP RE ABS \<-max.z > SWAP IM ABS \<-max.z > OR
IF
THEN ROT DROP "To get here a sol,
try & let \<-max.z =
99, instead of 9,
in inv\166z & in ERF" SWAP "Failure as
Interm.Newton
result (a,b)=
" SWAP 1 RND + ", &
|a|" + \<-max.z 10 < " or " "or" IFTE + "|b| \>=" + \<-max.z R\->I + " not OK in ERF" + UNROT SWAP ROT POP DOERR
END
p SWAP z
\>>
\>>
UNTIL OVER - DUP RE ABS .0000000001 < SWAP IM ABS .0000000001 < AND
END UNROT DROP2
\>>


Attached File(s)
.hp  ERROR.11c.hp (Size: 12.9 KB / Downloads: 1)
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 - 12-21-2023 11:50 AM



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