Tikal-25 Manual - Defining and Invoking Functions
On Level II, functions with up to 3 variables can be defined and invoked with the 2nd DEFFN and the fn keys.
Basics
After pressing 2nd DEFFN, the calculator
enters function definition mode, marked as "DFn" in the display. Until the = key is pressed,
all operations and parameters are added to the function instead of being executed. At the beginning of
the definition state, the function definition stores the state of the trigonometric units, with an
operation to restore the unit added when finishing the function definition. This way, the trigonometric unit
can be changed for operations executed by the functions without changing the state of the calculator after
executing the function.
When leaving the function definition with pressing =, the number of the function
just entered is displayed, starting with 0. Additionally, the display shows the "Fn" indicator when there are functions defined.
The function is invoked through entering this number and pressing fn. Multiple functions
can be defined, but for now it is not possible to invoke functions while defining functions to avoid
infinite recursion loops. When a calculation becomes so complicated that this mechanism is not enough, it is probably a good idea
to write a program for this, which is out of scope for this calculator model.
Variables
Three variables can be used in functions: x,y and z. To use a variable in a function definition, press e.G. 2nd x?
to retrieve the value of x. After leaving the function definition, the variable value can be set to the currently
displayed number by pressing x= before invoking the function. The default variable value is 0.
To clear the function store, press CLR twice. Saving / Restoring functions will be added in a later version.
Pressing CLR once will cancel the current function definition and return to normal calculator state. Try again.
Example
1. def fn0(x): convert Radian to Gon (Gradian) |
I |
0 |
Switch to Level II |
2nd DEFFN |
0 |
Start definition |
DRG |
0 |
Switch trig. unit to Radian |
2nd x? |
0 |
recall x variable |
II III sin |
0 |
Switch to level I and invoke sin |
DRG |
0 |
Switch to Gradian/Gon unit |
2nd asin |
0 |
Arcus sinus |
= |
0 |
Terminate function definition |
1a. fn0(π/2) = 100 |
I |
0 |
Switch to level II |
π ÷ |
3.1415927 |
Enter π |
2 = |
1.5707963 |
Divide by two |
x= |
1.5707963 |
Assign to x variable |
0 fn |
100 |
Invoke function 0 to convert to Gon/Gradian |
2. def fn1(x) = 2 x2 + 3 x + 9 |
2nd DEFFN |
0 |
Start definition |
2 × |
2 |
|
x? x2 + |
0 |
|
3 × |
3 |
|
x? + |
0 |
|
9 = |
1 |
Stored as fn1 |
2a. fn1(7) = 128 |
7 x= |
7 |
x = 7 |
1 fn |
128 |
fn1(x) |
3. def fn2(x,y) = 3 x2 + 2 y - 5 |
2nd DEFFN |
0 |
Start definition |
3 × |
3 |
|
x? x2 + |
0 |
|
2 × |
2 |
|
y? - |
0 |
|
5 = |
2 |
Stored as fn2 |
3a. fn2(5,4) = 78 |
5 x= |
5 |
x = 5 |
4 y= |
4 |
y = 4 |
2 fn |
78 |
fn2(x,y) |
3b. fn2(5,7) = 84 |
7 y= |
4 |
y = 7, x is already set in 3a |
2 fn |
84 |
fn2(x,y) |