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:02:38 -0400
Stavros Macrakis wrote:
> On Mon, Oct 13, 2008 at 12:09 PM, Raymond Toy <raymond.toy at ericsson.com
> <mailto:raymond.toy at ericsson.com>> wrote:
>
> ... It seems to me that the problem is actually in the value of pi.
> I put a break point at *fpsin, and this is what I see, when we
> change the precision from 64 to 128.
>
>
> Internally, if code wants bfloat pi to the current precision, it should
> be calling (fppi), not looking at bigfloat%pi.
>
> I think the problem is that when fpprec is set, fpprec1 is called. But
> this only updates the bfloat versions of 1, 0, +/- 1/2. Perhaps we need
> to update the bigfloat values of %pi at least, and probably also %e and
> %gamma.
>
>
> 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).
Not quite sure what happens then. But it's clear the argument to fpsin
is off a bit.
Ray