Proof of X≤Y inverse to X˃Y
|
09-01-2018, 07:51 PM
Post: #9
|
|||
|
|||
RE: Proof of X≤Y inverse to X˃Y
(09-01-2018 08:40 AM)Gamo Wrote: Recently I try to do the inverse of the [X≤Y] to [X˃Y] No, this can and will not work. Three times the same test does exactly the same as one single test. So... X≤Y? X≤Y? X≤Y? ...is the same as a single X≤Y? test. Just with two wasted program lines. Do you want a proof? (09-01-2018 12:57 PM)Gamo Wrote: When doing the inverse logic in program next line will be False follow by True To invert a test simply have it followed by another test that always is false. Your third step ("True") does not change anything and can be removed. Example: if you know that X definitely is not zero, the "always false" step can be "X=0?". This way... X≤Y? X=0? ...becomes an "X>Y?" test. BUT: On the 12C or other calculators with line addressing inverting a test can be done even easier: simply have the test followed by a GTO to the second next line. Code: 21 ... Of course you can also skip two or more lines. Example: if X>Y store R1 into R2. Code: 21 ... Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)