The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
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?
GTO A

x>=y:

Code:
x<y?
x=y?
GTO A

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?
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


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



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