14 Feb
2012
14 Feb
'12
6:53 p.m.
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