Exponential Integrals - Complex Bigfloat algorithm



Thank you very much for your help.

I have got it. The precision of bigfloat%e and bigfloat%gamma were the problem.
I did not see your simple way of recalculation the constants. We get now:

E1(0.5)

Maxima Bigfloat for 16,32 and 64 digits:

 5.597735947761609b-1
 5.5977359477616081174679593931509b-1
 5.597735947761608117467959393150852352268468903163535152482932194b-1

functions.wolfram.com with 64 digits:

0.5597735947761608117467959393150852352268468903163535152482932191

in agreement within 64 digits 

E1(1.5);

Maxima Bigfloat for 16,32,64 digits:

 1.000195824066326b-1
 1.0001958240663265190190933991167b-1
 1.000195824066326519019093399116669782617300061403505850505670605b-1

Functions.wolfram.com with 64 digits:

0.1000195824066326519019093399116669782617300061403505850505670604

in agreement within 64 digits

So, I have to do further tests. But these results show that the algorithm for
the complex Bigfloat numbers seems to work quite fine.

Again, thank you for your help.

Dieter Kaiser

-----Urspr?ngliche Nachricht-----
Von: willisb at unk.edu [mailto:willisb at unk.edu] 
Gesendet: Sonntag, 20. Juli 2008 18:46
An: Dieter Kaiser
Cc: maxima at math.utexas.edu
Betreff: Re: [Maxima] Exponential Integrals - Complex Bigfloat algorithm

-----maxima-bounces at math.utexas.edu wrote: -----

>I suppose the problems arise because we need the constants BIGFLOAT%E and
>BIGFLOAT%GAMMA in the calculation.

That's a good start, I think. Try something like

  (let ((bigfloat%e ($bfloat '$%e)) ...)

Also, if your code changes the value of fpprec, look at the macro
bind-fpprec (defined in nummod.lisp).


Barton