ratepsilon



How about:

If abs(im) < epsilon*abs(re) then rationalize(re)
else if abs(re) < eplsilon*abs(im) then rationalize(im)*%i
else rationalize re+im*%i

-- best regards, david stoutemyer

On Fri, Jun 29, 2012 at 6:50 AM, Henry Baker <hbaker1 at pipeline.com> wrote:

> I want to "rationalize" a complex number, but I don't want to rationalize
> the real & imaginary parts separately, because this won't convert
> 1.0+%i*1.0e-10 into 1.
>
> ratepsilon isn't helping here.
>
> Any suggestions?
>
> Thanks in advance.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>