SF [2159499] Full bigfloat precision for Gamma after the second call
Subject: SF [2159499] Full bigfloat precision for Gamma after the second call
From: Raymond Toy
Date: Mon, 13 Oct 2008 13:17:32 -0400
Stavros Macrakis wrote:
> On Mon, Oct 13, 2008 at 1:02 PM, Raymond Toy <raymond.toy at ericsson.com
> <mailto:raymond.toy at ericsson.com>> wrote:
>
> Stavros Macrakis wrote:
> > No! fppi takes care of calculating the value of pi *if needed* and
> > caching it. If it is not needed, it should not be calculated, as that
> > can be very expensive.
>
> Fair enough. That makes sense.
>
> Now I'm not exactly sure what is happening. I can see fppi is called
> before *fpsin is called. And fppi is called again from *fpsin (because
> *fpsin adds 8 to fpprec).
>
>
> Sorry, I haven't looked at the code, but (fppi) should be called /every
> time/ the bigfloat value of %pi is wanted, not only when fpprec is known
> to have changed. bigfloat%pi should be treated as a private internal
> variable of fppi.
>
> Is that what is happening?
Yes, believe so.
But I do see an issue with the gamma routine itself:
(%i3) fpprec:128;
(%o3) 128
(%i4) gamma(bfloat(1/2));
(%o4)
1.7724538509055160272981674833411451827975494561223871282138077898529112\
845910321813749506569298518638225876981364384199435516811b0
(%i5) gamma(bfloat(1/2));
(%o5)
1.7724538509055160272981674833411451827975494561223871282138077898529112\
845910321813749506567385446654162268236242825706662361474b0
Note that these differ quite a bit. Just need to track down what's
happening here....
Ray