11-01-2017, 06:03 PM
hi everybody,
Luckily Prime has inside its CAS two useful functions to magare problems connected to error treatment and statistics: the error function, erf() and the complementary error function, erfc().
If one want to "complete" that series, could think to implement also other two "sisters": the imaginary error function, erfi() and a function that I call "erfw", otherwise w(z) that handles every complex number.
See here for theory.
The code:
erfi()
erfw()
Enjoy with the Prime!
Salvo Micciché
Luckily Prime has inside its CAS two useful functions to magare problems connected to error treatment and statistics: the error function, erf() and the complementary error function, erfc().
If one want to "complete" that series, could think to implement also other two "sisters": the imaginary error function, erfi() and a function that I call "erfw", otherwise w(z) that handles every complex number.
See here for theory.
The code:
erfi()
Code:
#cas
erfi(x):=
return -i*erf(i*x)
#end
erfw()
Code:
// complex error function
#cas
erfw(x):=
return (e^-(x^2))*erfc(-i*x)
#end
Enjoy with the Prime!
Salvo Micciché