Download SandMath

Transcript
SandMath_44 Manual Errare humanum est.
In mathematics, the error function (also called the Gauss error function) is a special function (nonelementary) of sigmoid shape which occurs in probability, statistics and partial differential equations. Its
definition and the expression based on the Hyper-geometric function (via ascending series) are given in
the table below:
erf x = (2x/π1/2) exp(-x2) 1F1( 1, 3/2 ; x2 )
The complementary error function, denoted erfc, is defined as :
erfc = 1 – erf (x)
Both functions are shown below for an overview.
The unsung hero: HGF+
If we’re to believe that behind a great man there is often an even greater woman, then the greatest
idea behind all these functions is the implementation of the Generalized Hyper-geometric function. A
general-purpose definition requires the use of data registers for the parameters (a1... am) and (b1, ...
bn) , and expects the argument x in the X register, and the number of parameters m and n is stored in
Z and Y, for the generic expression:
mFp(a1,a2,....,am ;
b1,b2,....,bp ; x ) =
=
•
•
•
•
•
•
Σk=0,1,2,..... [(a1)k(a2)k.....(am)k] / [(b1)k(b2)k.....(bp)k] . xk/k!
If m = p = 0 , HGF+ returns exp(x)
The program doesn't check if the series are convergent or not.
Even when they are convergent, execution time may be prohibitive: press any key to stop
Stack register T is saved and x is saved in L-register.
R00 is unused.
The alpha "register" is cleared.
The original HGF+ was written by Jean-Marc Baillard. Only small changes have been made to the
version in the SandMath, optimizing the code and checking for ALPHA DATA in all registers used, as
well as for the argument x.
(c) Ángel M. Martin Revision 44_E Page 71