https://github.com/JuliaLang/julia/issues/7089 

> On Jun 2, 2014, at 7:44 PM, "Steven G. Johnson" <[email protected]> wrote:
> 
>> On Monday, June 2, 2014 2:19:00 PM UTC-4, anonymousnoobie wrote:
>> Does julia have a package or library to compute exponential integral 
>> 
>>   http://en.wikipedia.org/wiki/Exponential_integral 
>> 
>> for real positive argument  arbitrary precision ??
> 
> Yes, the exponential integral function is included with the MPFR library, 
> which is bundled with Julia and used for its BigFloat (arbitrary precision) 
> type.
> 
> However, currently it's not exposed by a nice API, so you have to define:
> 
> function eint(x::BigFloat)
>     z = BigFloat()
>     ccall((:mpfr_eint, :libmpfr), Int32, (Ptr{BigFloat}, Ptr{BigFloat}, 
> Int32), &z, &x, Base.MPFR.ROUNDING_MODE[end])
>     return z
> end
> 
> and then you can do e.g. 
> 
> eint(big(2.2))
> 
> to compute Ei(2.2) in arbitrary precision.
>  

Reply via email to