Complex Error Function Python
Contents |
2/sqrt(pi)*integral(exp(-t**2), t=0..z). Parameters:x python return error from function : ndarray Input array. Returns:res : ndarray The values of complex error function matlab the error function at the given points x. See also erfc, erfinv, erfcinv Notes The cumulative of the unit normal distribution
Python Gamma Function
is given by Phi(z) = 1/2[1 + erf(z/sqrt(2))]. References [R236]http://en.wikipedia.org/wiki/Error_function [R237]Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972. http://www.math.sfu.ca/~cbm/aands/page_297.htm [R238]Steven G. Johnson, Faddeeva W function implementation. http://ab-initio.mit.edu/Faddeeva Previous topic scipy.special.digamma Next topic scipy.special.erfc © Copyright 2008-2014, The Scipy community. Last updated on Jan 18, 2015. Created using Sphinx 1.2.2.
Exceptions are noted. Error handling¶ Errors are handled by returning nans, or other appropriate values. Some of the special function routines will emit warnings when an error occurs. By default this is disabled. To enable
Perl Error Function
such messages use errprint(1), and to disable such messages use errprint(0). Example: >>> php error function print scipy.special.bdtr(-1,10,0.3) >>> scipy.special.errprint(1) >>> print scipy.special.bdtr(-1,10,0.3) errprint([inflag]) Sets or returns the error printing flag for special functions. SpecialFunctionWarning Warning c++ error function that can be issued with errprint(True) Available functions¶ Airy functions¶ airy(z) Airy functions and their derivatives. airye(z) Exponentially scaled Airy functions and their derivatives. ai_zeros(nt) Compute nt zeros and values of the http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.special.erf.html Airy function Ai and its derivative. bi_zeros(nt) Compute nt zeros and values of the Airy function Bi and its derivative. itairy(x) Integrals of Airy functions Elliptic Functions and Integrals¶ ellipj(u,m) Jacobian elliptic functions ellipk(m) Complete elliptic integral of the first kind. ellipkm1(p) Complete elliptic integral of the first kind around m = 1 ellipkinc(phi,m) Incomplete elliptic integral of the first kind ellipe(m) Complete elliptic integral of http://docs.scipy.org/doc/scipy/reference/special.html the second kind ellipeinc(phi,m) Incomplete elliptic integral of the second kind Bessel Functions¶ jv(v,z) Bessel function of the first kind of real order and complex argument. jn(v,z) Bessel function of the first kind of real order and complex argument. jve(v,z) Exponentially scaled Bessel function of order v. yn(n,x) Bessel function of the second kind of integer order and real argument. yv(v,z) Bessel function of the second kind of real order and complex argument. yve(v,z) Exponentially scaled Bessel function of the second kind of real order. kn(n,x) Modified Bessel function of the second kind of integer order n kv(v,z) Modified Bessel function of the second kind of real order v kve(v,z) Exponentially scaled modified Bessel function of the second kind. iv(v,z) Modified Bessel function of the first kind of real order. ive(v,z) Exponentially scaled modified Bessel function of the first kind hankel1(v,z) Hankel function of the first kind hankel1e(v,z) Exponentially scaled Hankel function of the first kind hankel2(v,z) Hankel function of the second kind hankel2e(v,z) Exponentially scaled Hankel function of the second kind The following is not an universal function: lmbda(v,x) Jahnke-Emden Lambda function, Lambdav(x). Zeros of Bessel Functions¶ These are not universal functions: jnjnp_zeros(
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more http://stackoverflow.com/questions/11803487/imaginary-error-function-in-c about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow https://docs.python.org/2/library/math.html is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up imaginary error function in c++ up vote 2 down vote favorite Is error function there a GPL library or a piece of code freely available that implements the imaginary error function: erfi(x)=-i*erf(i*x) where x is any complex number (or at least real) and i is the imaginary unit? c++ math share|improve this question edited May 11 '13 at 17:42 Shafik Yaghmour 101k19229330 asked Aug 3 '12 at 21:23 yannick 197113 add a comment| 3 Answers 3 active oldest votes up vote 8 down complex error function vote accepted A free/open-source C++ implementation of all of the usual error functions for real and complex arguments, including both erfi and a scaled erfi (to cancel erfi's exponential growth) (the Dawson function), including optimizations for erfi of real arguments, is available at http://ab-initio.mit.edu/Faddeeva (Note that this implementation is actually used in the upcoming version 0.12 of SciPy, replacing the complex-erf code in earlier versions which had accuracy problems: http://projects.scipy.org/scipy/ticket/1207) (Unfortunately, evaluating special functions of complex arguments isn't as simple as plugging complex numbers into code for real arguments, which is why the templating in Boost's real-valued erf is of no help here.) share|improve this answer answered Dec 23 '12 at 3:43 Steven G. Johnson 36133 1 I checked Steven's code using a Fourier transform method, and I can confirm that it is accurate to at least 13 digits, typically 14-15 digits. I wrapped Steven's code as a C library, libcerf, complete with man pages and autotools installation scripts. –Joachim Wuttke May 20 '13 at 9:29 add a comment| up vote 3 down vote After finding that Boost doesn't support complex numbers for the erf function, I did some more searching. I found several $100 per year math packages for C++, which doesn't meet you
module is always available. It provides access to the mathematical functions defined by the C standard. These functions cannot be used with complex numbers; use the functions of the same name from the cmath module if you require support for complex numbers. The distinction between functions which support complex numbers and those which don't is made since most users do not want to learn quite as much mathematics as required to understand complex numbers. Receiving an exception instead of a complex result allows earlier detection of the unexpected complex number used as a parameter, so that the programmer can determine how and why it was generated in the first place. The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats. 9.2.1. Number-theoretic and representation functions¶ math.ceil(x)¶ Return the ceiling of x as a float, the smallest integer value greater than or equal to x. math.copysign(x, y)¶ Return x with the sign of y. On a platform that supports signed zeros, copysign(1.0, -0.0) returns -1.0. New in version 2.6. math.fabs(x)¶ Return the absolute value of x. math.factorial(x)¶ Return x factorial. Raises ValueError if x is not integral or is negative. New in version 2.6. math.floor(x)¶ Return the floor of x as a float, the largest integer value less than or equal to x. math.fmod(x, y)¶ Return fmod(x, y), as defined by the platform C library. Note that the Python expression x % y may not return the same result. The intent of the C standard is that fmod(x, y) be exactly (mathematically; to infinite precision) equal to x - n*y for some integer n such that the result has the same sign as x and magnitude less than abs(y). Python's x % y returns a result with the sign of y instead, and may not be exactly computable for float arguments. For example, fmod(-1e-100, 1e100) is -1e-100, but the result of Python's -1e-100 % 1e100