find_root with bfloats



 On 9/25/10 5:16 PM, Kostas Oikonomou wrote:
> Robert, Ray, thank you.  I don't have a good sense of which approach
> is simpler or better.  Ray, let me know what you decide.
As the author of the bigfloat package, I'm biased.  But, as you can see,
I barely made any changes to find-root-subr, so it does make it easier
to convert existing double-float routines to handle bigfloats.  The
difficult parts are usually in figuring out when to convert to and from
the bigfloat representation to maxima's internal bfloat representation.

But here is my quick attempt at bf_find_root.  I'm pretty sure there are
bugs here, but the couple of examples I tried work:

fpprec:32;

bf_find_root(cos(x),x,0,2);
1.5707963267948966192313216916398b0

bf_find_root(x^2-2,x,1,2);
1.4142135623730950488016887242097b0

Ray

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bf_find_root.lisp
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20100926/4e3325dd/attachment.ksh>;