Chapter 2
C Language Reference
2-44
ni.com
in terms of speed, but is needed to compute an accurate result. By changing
this behavior, you can speed up the operation if you are willing to give up
some accuracy.
Note
For more information on the implementation of multiplication and division macros,
refer to the
SystemBuild User Guide
.
Fixed-Point Relational Macros
The relational macros compare two numbers and return a Boolean result
(true or false). Macros for relational operations are defined in
sa_fxr.h
.
These macros are defined in terms of low-level relational macros present in
sa_fxprv.h
.
Figure 2-10 shows how the relational macros are named. Notice that macro
names have no embedded spaces.
Figure 2-10.
AutoCode/C Relational Macros
bool op _ s1 w1 _ s2 w2 (n1,n2,rp1, rp2)
n1 = First fixed-point operand
n2 = Second fixed-point operand
rp1 = Radix position for n1
rp2 = Radix position for n2
s2 = sign of n2 (u=unsigned, s=signed)
w1 = size of n1 (b=byte, s=short, l=long)
w2 = size of n2 (must = size of n1; see w below)
s1 = sign of n1 (u=unsigned, s=signed)
op = GT, GE, LT, LE, EQ, NEQ
GT = greater than
GE = greater than or equal
LT = less than
LE = less than or equal
EQ = equal
NEQ = not equal
bool = indicates Boolean relational operation
_ (underscore character; part of macro name)
_ (underscore character; part of macro name)