Post Reply 
erfi, erfw (w(z)) functions
11-01-2017, 06:03 PM
Post: #1
erfi, erfw (w(z)) functions
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:

return -i*erf(i*x)


// complex error function
return (e^-(x^2))*erfc(-i*x)

Enjoy with the Prime!

Salvo Micciché

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
08-22-2020, 04:10 PM (This post was last modified: 11-04-2020 01:47 AM by Albert Chan.)
Post: #2
RE: erfi, erfw (w(z)) functions
A mnemonic I find useful
swap -1 and i, and swap the function (erf ↔ erfi, sin ↔ sinh, cos ↔ cosh, tan ↔ tanh)

erf (-x) = - erf(x)    → erf (ix) = i erfi(x)
erfi(-x) = - erfi(x)   → erfi(ix) = i erf(x)

sin (-x) = - sin(x)    → sin (ix) = i sinh(x)
sinh(-x) = - sinh(x)   → sinh(ix) = i sin(x)

cos (-x) =   cos(x)    → cos (ix) =   cosh(x)
cosh(-x) =   cosh(x)   → cosh(ix) =   cos(x)

tan (-x) = - tan(x)    → tan (ix) = i tanh(x)
tanh(-x) = - tanh(x)   → tanh(ix) = i tan(x)
Find all posts by this user
Quote this message in a reply
Post Reply 

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