Re: [Fractdev] Problems with Bignum sqrt()

Top Page
Delete this message
Reply to this message
Author: Paul
To: 'Fractint developer's list'
Subject: Re: [Fractdev] Problems with Bignum sqrt()
Hi Jonathan,

You're a genius :)

That fixed it.

Thanks a lot matie.


Paul de Leeuw Computers     NSW Central Coast, Australia
Email:                             pdeleeuw@???
www:                           <>
ABN                                         72 360 822 562

-----Original Message-----
From: fractdev-bounces@??? [] On Behalf Of Jonathan Osuch
Sent: Wednesday, 15 February 2012 12:53 PM
To: Fractint developer's list
Subject: Re: [Fractdev] Problems with Bignum sqrt()


> I have been experimenting with converting all the Tierazon fractals to
> bignum. The only one I struggled with uses sqrt_bf(). I notice that
> this isn’t used anywhere in fractint, so I’m not sure if anyone has
> played with it.

Try replacing the division call:

unsafe_div_bf(bftmp3, n, r);


div_bf(bftmp3, n, r);

The problem with using the unsafe version is that both n and r get modified by the call and we use r in the line that follows the division.

> I wrote a simple test program to check sqrt_bf() and it seemed to work
> okay for low precision numbers.

This is because our 'estimate' of the square root is the result of the function call to sqrtl(), which should give good results.


Fractdev mailing list