newRPL: [UPDATED April 27-2017] Firmware for testing available for download
|
05-07-2017, 06:55 PM
Post: #657
|
|||
|
|||
RE: newRPL: [UPDATED April 27-2017] Firmware for testing available for download
(05-07-2017 04:04 AM)The Shadow Wrote: There's something similar going on with algebraics... 'X/2' EVAL's to '1/2*X', which seems odd. Bear in mind there's no CAS yet. There's only a rudimentary numeric reduction that allows you to work with fractions, so when you EVAL, numbers tend to be grouped together before variables, much like when you write a polynomial: a*x+b*X^2+... the coefficients go first. and it favors displaying fractions as fractions 1/2, instead of 2^(-1)*X. Regarding simplifications like adding 0: I didn't get to implement any of that yet, it makes sense that adding 0 (or multiplying by 1) should be eliminated during the numeric reduction. Now multiplying by 0 is a different story: 0*X cannot be simplified unless you know what X contains. It could be Infinity, then the result would be indeterminate, not zero. (05-07-2017 04:04 AM)The Shadow Wrote:Quote:Can you provide an example that fails? my tests here worked OK. Thanks. In this case NTHTOKEN worked, RTRIM and TRIM both worked. What happens is that for whatever reason it seems my code beautifier is adding a new line at the end of that object, so TRIM is not removing the tick mark, because there's a non-separator character after that. You need to include a newline as a separator as well (for now anyway, the code beautifier doesn't need to add a newline at the end so that's probably changing soon): "' " TRIM and it will remove both characters. As far as when you ran STR-> on that number, it seems it was compiled as a valid identifier, which is a bug (it should've been rejected as a syntax error). It behaves like any other identifier after that. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)