Difference between revisions of "cpp/numeric/special functions/expint"
m (Text replace - "special_math" to "special_functions") |
m (dcl header) |
||
Line 2: | Line 2: | ||
{{cpp/numeric/special_functions/navbar}} | {{cpp/numeric/special_functions/navbar}} | ||
{{dcl begin}} | {{dcl begin}} | ||
+ | {{dcl header | cmath}} | ||
{{dcl |num=1|since=c++17| | {{dcl |num=1|since=c++17| | ||
double expint( double arg ); | double expint( double arg ); | ||
Line 55: | Line 56: | ||
[http://mathworld.wolfram.com/ExponentialIntegral.html Weisstein, Eric W. "Exponential Integral."] From MathWorld--A Wolfram Web Resource. | [http://mathworld.wolfram.com/ExponentialIntegral.html Weisstein, Eric W. "Exponential Integral."] From MathWorld--A Wolfram Web Resource. | ||
− | + | {{langlinks|de|es|fr|it|ja|pt|ru|zh}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 07:20, 29 November 2019
Defined in header <cmath>
|
||
double expint( double arg ); float expint( float arg ); |
(1) | (since C++17) |
double expint( IntegralType arg ); |
(2) | (since C++17) |
Contents |
Parameters
arg | - | value of a floating-point or Integral type |
Return value
If no errors occur, value of the exponential integral ofarg
, that is -∫∞-arge-t |
t |
Error handling
Errors may be reported as specified in math_errhandling
- If the argument is NaN, NaN is returned and domain error is not reported
- If the argument is ±0, -∞ is returned
Notes
Implementations that do not support C++17, but support ISO 29124:2010, provide this function if __STDCPP_MATH_SPEC_FUNCS__
is defined by the implementation to a value at least 201003L and if the user defines __STDCPP_WANT_MATH_SPEC_FUNCS__
before including any standard library headers.
Implementations that do not support ISO 29124:2010 but support TR 19768:2007 (TR1), provide this function in the header tr1/cmath
and namespace std::tr1
.
An implementation of this function is also available in boost.math
Example
Output:
Ei(0) = -inf Ei(1) = 1.89512 Gompetz constant = 0.596347
External links
Weisstein, Eric W. "Exponential Integral." From MathWorld--A Wolfram Web Resource.