# HP 48gII User Manual Page 701

Graphing calculator.

If you are in the BRCH menu, i.e., („°@) @ BRCH@ ) you can use the following
shortcuts to type in your CASE construct (The location of the cursor is
indicated by the symbol
„@) C ASE@: Starts the case construct providing the prompts: CASE
THEN END END
‚@) C ASE@: Completes a CASE line by adding the particles THEN
Example – program f
(x) using the CASE statement
3
The function is defined by the following 5 expressions:
f
Using the CASE statement in User RPL language we can code this function as:
→ x
CASE 'x<3' THEN 'x^2' END 'x<5' THEN '1-x' END
«
«
'x<3*π' THEN 'SIN(x)' END 'x<15' THEN 'EXP(x)' END –2 END
EVAL " "
Store the program into a variable called @@f3c@. Then, try the following
exercises:
@@f3c@
1.5
@@f3c@
2.5
@@f3c@
4.2
@@f3c@
5.6
@@f3c@
12
@@f3c@
23
):
2
x
,
if
x
1
x
,
if
3
(
x
)
sin(
x
),
if
5
3
exp(
x
),
if
3
π
, 2
elsewhere
Result: 2.25 (i.e., x
2
)
2
Result: 6.25 (i.e., x
)
Result: -3.2 (i.e., 1-x)
Result: -0.631266... (i.e., sin(x), with x in radians)
Result: 162754.791419 (i.e., exp(x))
Result: -2. (i.e., -2)
3
x
5
x
3
π
x
15
Page 21-52
END