Hi Jonathan, You're a genius :) That fixed it. Thanks a lot matie. Paul. ---------------------------------------------------------- Paul de Leeuw Computers NSW Central Coast, Australia Email: pdeleeuw@deleeuw.com.au www: <http://www.deleeuw.com.au> ABN 72 360 822 562 ---------------------------------------------------------- -----Original Message----- From: fractdev-bounces@mailman.xmission.com [mailto:fractdev-bounces@mailman.xmission.com] 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() Paul,
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); with: 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. Jonathan _______________________________________________ Fractdev mailing list Fractdev@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/fractdev