Post Reply 
newRPL - build 1255 released! [updated to 1299]
01-11-2019, 04:16 PM
Post: #355
RE: newRPL - build 1089 released! [update:build 1127]
(01-11-2019 03:05 AM)The Shadow Wrote:  I'm trying to come up with situations in which one would define conditions on things other than numeric values, and so far I'm coming up blank.

I suppose there might be cases in which one would condition on the exact form of an expression, but surely that's what the actual rules are for?

Likewise, there might be cases where the exact variable being matched would matter, but every case I can think of would be better handled either by just using that variable in the rule, or by the variable attributes you've discussed. Conditioning on those attributes would indeed be very useful, I trust that is possible? (To, for example, define a rule as only applying to matrix variables.) But they'd still be numeric values.

Is there some category of conditions I'm just not seeing?

I can't come up with an example either, but also remember, many numeric expressions can't be computed exactly with ->NUM either, imagine a rule to replace exact known values for SIN(), we need that argument to be expressed as a fraction of pi, which needs to remain symbolic to be exact.
You could write SIN(.NN*pi/2) in the rule itself, but that wouldn't match SIN(pi-pi/2) at first sight. Of course, you could use RULEAPPLY, which would fail at first, then do autosimplification (turning into SIN(pi/2)), then will try again and would match, but not with RULEAPPLY1 which would fail initially and that's the end of it.
Moving that to a condition by writing SIN(.NN) :-> ... | FP(2*.NN/pi)==0 you need to first simplify the condition symbolically so if .NN has pi as a factor it would cancel out, then numerically to check that the result is an integer without precision loss.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL - build 1001 released! - pier4r - 12-16-2017, 08:03 AM
newRPL - on Hp 39gs - Martin Hepperle - 06-05-2019, 06:51 AM
RE: newRPL - build 1001 released! - pier4r - 12-23-2017, 10:16 AM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 09:42 AM
t - Claudio L. - 01-01-2018, 03:06 PM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 03:41 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 04:54 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 06:58 PM
newRPL - brickviking - 10-05-2018, 06:01 AM
RE: newRPL - build 1089 released! [update:build 1127] - Claudio L. - 01-11-2019 04:16 PM
How to participate? - erazor - 12-13-2019, 07:12 AM



User(s) browsing this thread: