|
Example Complex comparison 021
|
Description
The result of the comparison operators on the jmple, jmplt
jmpeq, jmpne, jmpge and jmpgt functions.
Details
On the jmple function:
(setq X #c65.0)
(setq Y #c65.0+1.0i)
(setq Z #c65.0-1.0i)
(if (> Y X) true)
(if (> Y 65.0) true)
(if (> Y 65) true)
(if (> Y #\A) true)
(if (> 65.0 X) false true)
(if (> 65 X) false true)
(if (> #\A X) false true)
|
Returns: true
|
On the jmplt function:
(if (>= Y X) true)
(if (>= Y 65.0) true)
(if (>= Y 65) true)
(if (>= Y #\A) true)
(if (>= 65.0 Y) false true)
(if (>= 65 Y) false true)
(if (>= #\A Y) false true)
|
Returns: true
|
On the jmpeq function:
(if (<> Y X) true)
(if (<> Y 65.0) true)
(if (<> Y 65) true)
(if (<> Y #\A) true)
(if (<> 65.0 X) false true)
(if (<> 65 X) false true)
(if (<> #\A X) false true)
|
Returns: true
|
On the jmpne function:
(if (= X X) true)
(if (= X 65.0) true)
(if (= X 65) true)
(if (= X #\A) true)
(if (= 65.0 Z) false true)
(if (= 65 Z) false true)
(if (= #\A Z) false true)
|
Returns: true
|
On the jmpge function:
(if (< X Y) true)
(if (< 65.0 Y) true)
(if (< 65 Y) true)
(if (< #\A Y) true)
(if (< X 65.0) false true)
(if (< X 65 ) false true)
(if (< X #\A ) false true)
|
Returns: true
|
On the jmpgt function:
(if (<= X Y) true)
(if (<= 65.0 X) true)
(if (<= 65 Y) true)
(if (<= #\A Z) true)
(if (<= Y 65.0) false true)
(if (<= Y 65 ) false true)
(if (<= Y #\A ) false true)
|
Returns: true
|
Notes and Hints
The comparison operators are instrumental in
implementing comparison tests as shown in the above examples.
Only if the real parts of the two arguments are equal, the imaginary parts
are compared. If one argument has only a real part, the imaginary part is taken
to be zero.
Related Examples
Here are examples of the comparison function at work.
Function Links
Here is the link to the current function used in this example.
comparison
Here are a number of links to other related functions.
Argument Types
Here are the links to the data types of the arguments used in this example.
Here are a number of links to examples having similar argument types.
|
Analytic Information Server (AIS)
AIS Component Systems
- Smartbase Engine
- QT C++ Libraries
- MySQL Relational Database
- AIS Lisp Libraries
- Rapid Analytic Demo IDE
|