Interaction between floats and rational expression code.
Subject: Interaction between floats and rational expression code.
From: Richard Fateman
Date: Sun, 11 Apr 2010 10:46:56 -0700
Rupert Swarbrick wrote:
<snip>
> Anyway, I then realised that functions like RATTIMES don't preserve this
> "convention". For example, in the middle of a trace I get
>
> 1: (RATTIMES (1.2 . 1.0) (1 . 2) NIL)
> 1: RATTIMES returned (1.2 . 2.0)
>
Given the circumstances, rattimes should be returning (0.6 . 1)
On the other hand, I would prefer that ratsubst check that keepfloat is
NOT True. It can do this by giving an error message, or
alternatively, binding $keepfloat to nil. An appropriate note in the
documentation of ratsubst could make it clear how it reacts to
keepfloat:true.
Why not patch rattimes?
Because the notion of reduction to lowest terms, when there are floating
point numbers around, is a little vague.
Also checking innumerable times for a setting of a flag that, in all
likelihood, represents a user error, seems to me
to be esthetically unpleasing.
RJF (who programmed rattimes, once upon a time)
> Is there a way to deal with floats sensibly in the rational expressions
> code? And, if so, can anyone explain which bit went wrong in the
> original reported bug?
>
>
>
> Rupert
>
>
> [1] http://sourceforge.net/tracker/?func=detail&aid=1928142&group_id=4933&atid=104933
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>