New special functions Si(x), Ci(x)

I would like to see added to Igor's special functions the Sine and Cosine Integrals, Si(x) and Ci(x). In principle these can be derived from the Exponential Integral E1(x), but Igor's present implementation of expInt(1,x) does not allow the required complex arguments.
These functions will be available in IP7. The only solution I can offer right now is to write a procedure to evaluate the complex E1(z) from the series expansion.

A.G.
WaveMetrics, Inc.
Using somewhat obscure relations between the exponential integrals and the hypergeometric functions, here is an implementation for real arguments:
Function Ci(inx)
    Variable inx
    Make/n=2/free wavea=1
    Make/n=3/free waveb={2,2,1.5}
    variable arg=(-inx*inx)/4
    return arg*hypergpfq(wavea,waveb,arg)+ln(inx)+0.577215664901532
end

Function Si(inx)
    Variable inx
    Make/n=1/free wavea=0.5
    Make/n=2/free waveb=1.5
    variable arg=(-inx*inx)/4
    return inx*hypergpfq(wavea,waveb,arg)
end


I hope this helps,

A.G.
WaveMetrics, Inc.
AG,

Thanks for the rapid and useful response.

I have tested the above functions by comparing results with values tabulated in Abramowitz and Stegun, and they are in excellent agreement over the full range of arguments.