Post Reply 
newRPL - build 1255 released! [updated to 1299]
01-10-2019, 02:56 PM (This post was last modified: 01-10-2019 03:00 PM by Claudio L..)
Post: #351
RE: newRPL - build 1089 released! [update:build 1127]
(01-10-2019 12:43 AM)The Shadow Wrote:  Very nice. Are user rules done before or after the built-in rules? Oh - and have the list of AUTOSIMPLIFY rules changed from the last time you posted them? (I know they've been organized into groups. Maybe document them on the wiki?)

And when will it be ready to be released into the wild? Smile

(It might be handy later, btw, to be able to distinguish between even and odd integers in rules... Maybe .oVAR and .eVAR? Or, if rules can include IFTE expressions, that would do it and then some.)

Once it works and I stop changing things it will be fully documented in the wiki (this will be the foundation for reimplementing many of the 50g commands, so it needs to be well documented).

Algorithm works well now, still squashing the last few bugs (some crashes) and testing corner cases to make sure every subtlety is handled correctly. I'll test it internally at least for another week before letting it out. Failing to process corner cases would be OK for preview, but crashing the calc is not acceptable in my book.

Regarding IFTE: Mathematica calls them "constraints" and aren't exactly IFTE expressions. My thought was to have a single condition expression (then you can use AND() and OR() to pack multiple ones in one), in which you can use the special variables defined. This would be evaluated only when a match is found and is ready to make a replacement (hence all special variables have a definition).
The problem is this expression cannot be evaluated with ->NUM, variables that exist need to be replaced, then any equality needs to be tested by structure, not by value. In other words, we'd have to symbolically simplify this expression until we can check the equality to be true or false (we need to fire up the rules engine from within the engine to simplify the expression within the rule!).
This recursive embedded behavior can be a pain to handle, not to mention make everything slow to a crawl if every time a candidate replacement is found, we need to replace variables, simplify and test the condition.

But, dreaming out loud, what could be a good syntax to include such conditional expression?
Rules are 'Left:->Right'
Perhaps the | (given that) operator is a good choice?
for example, a condition to test for odd :
'√(.xX^.iN):->.xX^((.iN-1)/2)*√.xX | FP(.iN/2)≠0'

Mmmmm... this would need to be evaluated numerically as well, not just structure... need to think some more about this...
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-10-2019 02:56 PM
How to participate? - erazor - 12-13-2019, 07:12 AM

User(s) browsing this thread: 1 Guest(s)