Subject: How to deal with r^(bfloat(2/3))/r^(2.0/3)
From: Richard Fateman
Date: Thu, 13 Dec 2007 09:28:06 -0800
Well, if you insist on doing this, you can try
small(x):=is(x<1.0e-6);
matchdeclare(s,small);
tellsimp(r^s,1);
RJF
_____
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Barton Willis
Sent: Thursday, December 13, 2007 8:48 AM
To: fateman at EECS.Berkeley.EDU
Cc: maxima at math.utexas.edu; 'zycentre'; maxima-bounces at math.utexas.edu
Subject: Re: [Maxima] How to deal with r^(bfloat(2/3))/r^(2.0/3)
maxima-bounces at math.utexas.edu wrote on 12/13/2007 09:53:57 AM:
> Stavros has the right idea to look again at what you were doing.
>
> A rule like changing numbers less than 1.0b-16 to zero is questionable.
But
> then any use of r^(float) in Maxima is unusual, so maybe nothing else
will
> break.
>
I agree that such a rule is questionable. But if you still want to do it,
a standard Maxima programming idiom will do the trick:
f(e) := if mapatom(e) then <do something> else apply(op(e), map(f,
args(e)))
I mention this because the idiom is useful, not because I think that
expunging floating point "fuzz" is a good thing to do.
Barton