![HP 50G User Manual Download Page 697](http://html.mh-extra.com/html/hp/50g/50g_user-manual_156571697.webp)
Page 21-50
IF
x<3
THEN
x
2
ELSE
1-x
END
While this simple construct works fine when your function has only two
branches, you may need to nest IF…THEN…ELSE…END constructs to deal with
function with three or more branches. For example, consider the function
Here is a possible way to evaluate this function using IF… THEN … ELSE …
END constructs:
IF x<3 THEN
x
2
ELSE
IF x<5 THEN
1-x
ELSE
IF x<3
π
THEN
sin(x)
ELSE
IF x<15 THEN
exp(x)
ELSE
-2
END
END
END
END
⎪
⎪
⎪
⎩
⎪⎪
⎪
⎨
⎧
−
<
≤
<
≤
<
≤
−
<
=
elsewhere
x
if
x
x
if
x
x
if
x
x
if
x
x
f
,
2
15
3
),
exp(
3
5
),
sin(
5
3
,
1
3
,
)
(
2
3
π
π
Summary of Contents for 50G
Page 1: ...HP g graphing calculator user s guide H Edition 1 HP part number F2229AA 90006 ...
Page 130: ...Page 2 70 The CMDS CoMmanDS menu activated within the Equation Writer i e O L CMDS ...
Page 206: ...Page 5 29 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Page 257: ...Page 7 20 ...
Page 383: ...Page 11 56 Function KER Function MKISOM ...
Page 715: ...Page 21 68 Whereas using RPL there is no problem when loading this program in algebraic mode ...
Page 858: ...Page L 5 ...