find_root with bfloats



 On 9/26/10 9:39 PM, Robert Dodier wrote:
> On 9/26/10, Raymond Toy <toy.raymond at gmail.com> wrote:
>
>> 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:
> I don't really have any preference. So if you have a working version,
> by all means please go ahead and commit it.

Ok, I think I have a unified version now.  I moved the guts of
coerce-float-fun to another function that takes another argument to
specify whether to $float or $bfloat the answer.  Same for the support
functions.  Now there's coerce-float-fun (as before), and coerce-bfloat-fun.

The testsuite is working fine now with these changes, but I haven't
tried to do the equivalent tests with bf_find_root.

One issue is find_root_abs and find_root_rel.  I added bf_find_root_abs
and bf_find_root_rel.  But I left find_root_error unchanged.  Maybe
there should be a bf_find_root_error too?

If further testing is ok, I'll check in the changes.

Ray