FC/ARCOT                                      Date: 1952
     
    Purpose: Replaces F(A) by COT ( F(A) ). For use with FLOATCODE
    F(A) is expresed in radians. if F(A)=PI/4=0.7854 then 
    COT( F(A) ) = 0.9

    Cues:  $ $ / / . . . .    (for use with R.C.S/B)
    
    Floatcode - Bodleian Special Collection 
    MS. Eng. misc. b. 260-C.42.pdf
    p14
     
    Ferranti Mark I Programming Manual, second edition 
    Computer History Museum (https://computerhistory.org/)
    102724593-05-01-acc.pdf
    p142 
    
    Note by Roberto Sancho. On both PDFs, the routine is 
    stated as ARCOT, but it is not the ARC-COT (the cotangent
    inverse). The routine seems to be COT(A)=1/TAN(A)
     
    [Routine FC:ARCOT      ] 
 
    [Col /          E ]    
                           
    | A//M | / |      |    
    | WI/Y | E |      |    
    | M//H | @ |      |    
    | S//" | A |      |    
    | WI/Y | : |      |    
    | M//W | S |      |    
    | YI/Y | I |      |    
    | Z//$ | U |      |    
    | WI/G | # |      |    
    | WI/Q | D |      |    
    | G//W | R |      |    
    | ///V | J |      | call FC.SQUAREROOT routine   
    | WI/W | N |      |    
    | WI/Y | F |      |    
    | W//$ | C |      |    
    | WI/B | K |      |    
    | YI/Q | T |      |    
    | /U/$ | Z |      | closure (return from FLOATCODE routine)  
    | B/YO | L |      |    
    | II/P | W |      | ____   
    | O/QO | H |      | counting subsequence   
    | DSYG | Y |      |    
    | II/T | P |      |    
    | SU/P | Q |      | ____   
    | U/O$ | O |      |    
    | Z$$$ | B |      |    
    | //// | G |      | F(G/)=1   
    | /#:/ | " |      |    
    | //// | M |      | F(M/)=2"   =32768=3.2768 x 10^(4)
    | /#@E | X |      |    
    |      | V |      |    
    |      | $ |      |    
                

    Note by Roberto Sancho: on Ferranti Mark I Programming Manual program
    listing, there is an errata on first instruction. It is stated as A//H
    but should be A//M as stated in Floatcode - Bodleian Special Collection
    MS. Eng. misc. b. 260-C.42.pdf. Seems a typo (confussion H and M)

    [End]           125 142                    
                     
                 FC.ARCOT is a FLOATCODE subroutine
                    
    0  //  A//M  if F(A)>0 goto 7, else F(A)=-F(A)
    1  E/  WI/Y  [WI]=F(A), F(A)=0
    2  @/  M//H  F(A)=F(A)-[M/]=F(A)-2^11
    3  A/  S//"  goto 6 as floatcode
    4  :/  WI/Y  [WI]=F(A), F(A)=0
    5  S/  M//W  F(A)=F(A)+[M/]=F(A)+2^11
    6  I/  YI/Y  [YI]=F(A), F(A)=0  -> [YI] has the sign of argument
    7  U/  Z//$  goto 18 as machine code
    8  #/  WI/G  F(R)=[WI] -> abs value of arg
    9  D/  WI/Q  F(A)=F(A)+F(R)*[WI] -> F(A)=F(A)+[WI]^2
   10  R/  G//W  F(A)=F(A)+1
   11  J/  ///V  call sqrt
   12  N/  WI/W  add 2^11
   13  F/  WI/Y  save in [WI]
   14  C/  W//$  goto 20 as machine code
   15  K/  WI/B  F(R)=1/[WI]
   16  T/  YI/Q  
   17  Z/  /U/$  closure (return from FLOATCODE routine) 

   18  L/  B/YO  B5=-15
   19  W/  II/P  goto exec next FC instr
 
   20  H/  O/QO  B7= U/.. -> set U/ as last instr exec
   21  Y/  DSYG  incr B5
   22  P/  II/T  if (B>=0) goto 228 exec next FC instr (will be K/)
   23  Q/  SU/P  goto 231 -> goto next FC instr after B7 (#/)
   24  O/  U/O$  
   25  B/  Z$$$  

   26  G/  ////  const 1
   27  "/  /#:/  

   28  M/  ////  
   29  X/  /#@E  
   30  V/        
   31  $/        
                 
