Routines 
Prev: 3783  Up: Map 
The address of this routine is found in the table of addresses. It is called via the calculator literal +20 by the routines at DRAW and tan. It is also called indirectly via fp_calc_2.
This subroutine handles the function COS X and returns a 'last value' 'that is an approximation to COS X.
The subroutine uses the expression COS X=SIN (πW/2), where 1<=W<=1.


cos  37AA  RST $28  X  
37AB  DEFB $39  get_argt: V  
37AC  DEFB $2A  abs: ABS V  
37AD  DEFB $A1  stk_one: ABS V, 1  
37AE  DEFB $03  subtract: ABS V1  
37AF  DEFB $E0  get_mem_0: ABS V1, (1/0)  
37B0  DEFB $00  jump_true to C_ENT: ABS V1=W  
37B1  DEFB $06  
If the jump was not made then continue.


37B2  DEFB $1B  negate: 1ABS V  
37B3  DEFB $33  jump to C_ENT: 1ABS V=W  
37B4  DEFB $03 
Prev: 3783  Up: Map 