[Numpy-discussion] double-precision sqrt?

Adam Ginsburg adam.ginsburg at colorado.edu
Sat Oct 17 18:03:08 EDT 2009


Hi again, I apologize, the mistake was entirely my own.  Sqrt's do the
right thing....

Adam

On Sat, Oct 17, 2009 at 12:17 PM, Adam Ginsburg
<adam.ginsburg at colorado.edu> wrote:
> My code is actually wrong.... but I still have the problem I've
> identified that sqrt is leading to precision errors.  Sorry about the
> earlier mistake.
>
> Adam
>
> On Sat, Oct 17, 2009 at 12:08 PM, Adam Ginsburg
> <adam.ginsburg at colorado.edu> wrote:
>>
>> sqrt(float64(1.034324523462345))
>> # 1.0170174646791199
>> f=lambda x: x**2-float64(1.034324523462345)**2
>
> should be
> f=lambda x: x**2-float64(1.034324523462345)
>
> so the code I sent was not a legitimate test.
>



More information about the NumPy-Discussion mailing list