Conditional Expressions - HP -18C Owner's Manual

Business consultant
Table of Contents

Advertisement

Conditional Expressions
Formulas can include conditional expressions using the function IF.
For example, the solver accepts the formula:
BONUS=
IF (SALES
>
3000: . 02xSALES: .01
x
SALES)
The two colons inside the parentheses stand for NTHEN" and NOR
ELSE." According to this formula, if SALES are greater than 3000,
then the BONUS equals .02
x
SALES; otherwise, BONUS equals .01
x
SALES.
In general, the syntax of the IF function is:
IF(conditional expression
:
algebraic expression
:
algebraic expression)
The logical and relational operators that can be used in conditional
expressions are described in table 9-4.
Table 9-4. Operators Used in Conditional Expressions.
Logical Operators
Relational Operators
AND
>
(.[I])
Greater than
.
OR
<
(.[TI
)
Less than.
EXOR
=
Equal
to.
NOT
>=
Greater than or equal to.
<
=
Less than or equal
to.
<>
Not equal to.
148
9: The Formula Solver

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents