van Nek wrote:
> Am 5 Nov 2007 um 12:18 hat Raymond Toy (RT/EUS) geschrieben:
>
>>> +;; The algorithm is based on the series
>> +;;
>> +;; %e = sum( 1/i! ,i,0,inf )
>> +;;
>> +;; but sums up 1001 terms to one.
>>
>> Why only 1001 terms? But a glance at the actual code seems to show that
>> you keep summing until H is zero, so perhaps the comment is not quite
>> right. Or maybe I don't understand the comment at all.
>
> Ray,
>
> what I mean here is, that I sum up every 1001 summands to one summand. E.g. instead of
> summing 27027 needed quotients from the Taylor series, I only use 27. Right, I sum until
> the quotients are zero.
>
Oh, I see now. I missed the DO loops inside the main do loop. It also
looks like the inner do loops are multiply a bignum by a fixnum. I
think it's beneficial to try to rearrange the operations so you do
bignum times bignum arithmetic, so you can take advantage of fast bignum
multipliers. I guess that's for another day.
Ray