HP 32S: <= and >= comparisons
|
05-06-2015, 03:13 PM
Post: #1
|
|||
|
|||
HP 32S: <= and >= comparisons
Since the 32S lacks <= and >= comparisons, I'm trying to figure out the most efficient replacement. Are there better options than these? (GTO A is just an example; replace with your conditionally executed instruction of choice.)
x<=y: Code: x>y? x>=y: Code: x<y? Since the first comparison is the logical inverse of what we're looking for, and the second comparison (x=y?) will never be true if the first one is true, you're effectively writing "not x>y?" and "not x<y?", which are equivalent to "x<=y?" and "x>=y?" respectively. Are there any alternatives that are even more efficient, in terms of space or execution speed? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP 32S: <= and >= comparisons - Dave Britten - 05-06-2015 03:13 PM
RE: HP 32S: <= and >= comparisons - Dieter - 05-06-2015, 08:20 PM
RE: HP 32S: <= and >= comparisons - Dave Britten - 05-06-2015, 08:57 PM
|
User(s) browsing this thread: 1 Guest(s)