Post Reply 
newRPL - build 1255 released! [updated to 1299]
01-26-2019, 05:23 PM
Post: #369
RE: newRPL - build 1089 released! [update:build 1158]
(01-26-2019 04:55 PM)The Shadow Wrote:  In the new version, 'X*X' now becomes 'X^2'. Whew! Smile However, while 'X^2*X' becomes 'X^3', 'X*X^2' does not. If that's because you're using non-commutative multiplication, you needn't bother for that case - it takes quite a lot of warping and spindling of the multiplication operator before powers stop making sense. Even sedenions, for which multiplication isn't commutative, associative, or even alternative have well-defined powers which are the same from the left and from the right (or indeed, in any order with any set of parentheses). True, rectangular matrices don't have powers, but then those expressions would error in any case.
You are correct but you are missing the case with more factors. If we accept commutative multiplication it will shuffle all factors until it matches, so X*Y*X^2 will also match and become Y*X^3 which is incorrect for matrices. I just need to add the other non-commutative cases


(01-26-2019 04:55 PM)The Shadow Wrote:  I'm also a little puzzled by the parity attribute. What is the difference between a number being 'known to be odd' and being 'known to be an odd integer'? Are there non-integers for which parity is defined? I suppose you could define half-integers (ie, '1/2', '3/2', '5/2' and so on) to be odd in some sense, but I've never run across it before.
It needs to be a separate bit, so that odd integers are a subset of integers when you AND their attributes. As a result, some weird combinations can result like numbers with the odd bit set but not the integer bit.
Whether we ignore those cases mathematically or not doesn't really matter. It's a way to keep performance to a decent level. I just AND the attributes and check the result to determine if the expression matches or not.

(01-26-2019 04:55 PM)The Shadow Wrote:  By the way, parity can be defined for complex numbers too - at least in the Gaussian integers. Anything divisible by '1+i' (which has a norm of 2) is even, all other Gaussian integers are odd. That works out to, "If the real and imaginary parts have the same parity, the complex number is even. If they have different parity, it's odd." For the real integers, that gives the usual parity, but in the Gaussian integers as a whole, you get a checkerboard pattern.

Of course, there are many ways to define 'integers' in the complex plane, of which the Gaussian integers are only one. (Though the simplest.)

Is there a simple way to check if a complex is odd or even? If it won't perform I can't add it. For real numbers I just get the last digit and test one bit, that's fast enough so it doesn't bog the system (the idea is that some commands will be running hundreds of rules, so this needs to be fast).
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 1158] - Claudio L. - 01-26-2019 05:23 PM
How to participate? - erazor - 12-13-2019, 07:12 AM



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