find_root with bfloats



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.

						Kostas

On 09/25/10 01:59 PM, Raymond Toy wrote:
>   On 9/25/10 1:43 PM, Robert Dodier wrote:
>> Kostas, you must replace all of the ordinary floating point
>> arithmetic with Maxima arithmetic.
>> (There may be a way to get Lisp to call the appropriate
>> arithmetic functions automatically but, if so, I don't know how
>> to do that.)
>>
>> You can translate arithmetic as follows:
>>
>>   Lisp  Maxima
>>
>>   +  m+
>>   *  m*
>>   -  m-
>>   /  m//
>>
>>   >   mgrp
>>   <   not mgqp
>>   >= mgqp
>>   <= not mgrp
>>   = like
>
> Another approach which might be simpler is to use the bigfloat package.
> So + becomes bigfloat:+ and so on.  But you will also need to call
> bigfloat:to to convert maxima's bigfloat representation to a
> bigfloat:bigfloat.   And lastly, you need to call maxima:to to convert
> the bigfloat:bigfloat representation back to something the rest of
> maxima can understand.
>
> The bigfloat package also understands Lisp floats, rationals, complexes,
> and bigfloat reals and complexes.  So once the code is converted to use
> bigfloat, it can also be used for Lisp floats.  At the expense of some
> speed.
>
> I might take a look later on at the code and convert it myself.   Maxima
> should have bigfloat versions of everything.
>
> Ray
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima