[PATCH] Evaluate pow(x,n) at compile time
Joseph S. Myers
jsm28@cam.ac.uk
Thu Apr 10 23:31:00 GMT 2003
On Thu, 10 Apr 2003, Brad Lucier wrote:
> > It should be straighforward to construct examples for such formats that do
> > need about 2k bits and hopefully show the problem with GCC's
> > implementation.
>
> Well, the coding is straightforward, but it could take a *long* time in
> Maple to construct the test vectors; "long" is at least a day (how long
> I let it run on my ultrasparc without results) and it could be weeks or
> months as far as I know.
I was thinking of a more theoretical basis (specific to sqrt) for finding
examples than the method for general functions described on the referenced
page. E.g. sqrt(2^214 - 2^108) is in binary [106 1s]0.[107 1s]... (though
if I understand the described algorithm correctly, what's actually wanted
should be examples with square root [106 digits]1[many 0s].... which might
then get underestimated as [106 digits]0[many 1s]...) leading to bad
rounding).
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc-patches
mailing list