Prev: 14261 Up: Map Next: 14306
14298: THE 'TAN' FUNCTION (offset 33)
The address of this routine is found in the table of addresses. It is called indirectly via fp_calc_2.
This subroutine handles the function TAN X. It simply returns SIN X/COS X, with arithmetic overflow if COS X=0.
tan 14298 RST 40 X
14299 DEFB 49 duplicate: X, X
14300 DEFB 31 sin: X, SIN X
14301 DEFB 1 exchange: SIN X, X
14302 DEFB 32 cos: SIN X, COS X
14303 DEFB 5 division: SIN X/COS X=TAN X (report arithmetic overflow if needed)
14304 DEFB 56 end_calc: TAN X
14305 RET Finished: 'last value'=TAN X.
Prev: 14261 Up: Map Next: 14306