home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / ERF.(X) < prev    next >
Text File  |  1993-11-14  |  203b  |  10 lines

  1. # erf(x) is the error function
  2. # erf'(x_) := 2/sqrt(x)*e^(-x^2)
  3.  
  4. erf(0) := 0
  5. erf(inf) := 1
  6. erf(-inf) := -1
  7.  
  8. erf(x_) := if( isnumber(x) and numeric==on,
  9.      1/sqrt(pi)*(2*x - 2/3*x^3 + 1/5*x^5) )
  10.