rationalize vs rat



That assumes that 'rat' means 'the simplest rational number within
ratepsilon of the argument'.

Another reasonable (and perhaps useful) interpretation is 'the simplest
rational number whose 'float' is within ratepsilon of the argument'.

Not clear that your definition is more useful than the second definition --
is it important to deal with 0 < ratepsilon < 1/2 ulp?

            -s

On Sun, Dec 23, 2012 at 11:01 AM, Richard Fateman <fateman at eecs.berkeley.edu
> wrote:

> rationalize(float(1/3)) gives 6004799503160661/**18014398509481984
>
> but
> ratepsilon:0.0
> rat(rat(float(1/3)))  gives 1/3.
>
> I think the second answer should be the same as the first.
>
> RJF
>
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>