⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   B r a i n f u c k                                                                                                                                                                   
   +:∘/∘; 0:∘/∘;    ∘/∘  ->  ∘/+:∘;1:∘/∘;∘/∘       
   -:∘/∘; 1:∘/∘;    ∘/∘  ->  ∘/-:∘;0:∘/∘;∘/∘       
   >:∘/∘; 0:∘/∘;    ∘/∘  ->  ∘/>:∘;∘/0:∘;∘/∘       
   <:∘/∘;   ∘/0:∘;  ∘/∘  ->  ∘/<:∘;0:∘/∘;∘/∘       
   .:∘/∘; 0:∘/∘;    ∘/∘  ->  ∘/.:∘;0:∘/∘;∘/0:∘     
   ,:∘/∘; 1:∘/∘;  0:∘/∘  ->  ∘/,:∘;0:∘/∘;∘/∘       
  [:+:]:∘/∘; 0:∘/∘; ∘/∘  ->  ∘/]:+:[:∘;0:∘/∘;∘/∘   
  [:-:]:∘/∘; 5:∘/∘; ∘/∘  ->  ∘/]:-:[:∘;0:∘/∘;∘/∘   
 ,:>:,:<:[:-:>:+:<:]:>:.:∘/∘; 0:0:∘/∘; 2:3:∘/∘ -> ∘/.:>:]:<:+:>:-:[:<:,:>:,:∘;5:∘/0:∘;∘/5:∘                                                                                            
 ,:>:,:<:[:>:[:>:+:>:+:<:<:-:]:>:>:[:<:<:+:>:>:-:]:<:<:<:-:]:>:>:.:∘/∘; 0:0:0:0:∘/∘; 2:3:∘/∘ -> ∘/.:>:>:]:-:<:<:<:]:-:>:>:+:<:<:[:>:>:]:-:<:<:+:>:+:>:[:>:[:<:,:>:,:∘;6:0:∘/3:0:∘;∘/6:∘
 >:[:>:]:<:[:-:[:<:[:<:]:]:-:<:]:>:+:∘/∘; 1:1:2:0:∘/∘; ∘/∘ -> <:]:]:-:<:]:>:+:∘/[:<:[:-:[:<:]:>:[:>:∘;1:1:1:0:∘/∘;∘/∘                                                                  

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   B a l a n c e d   T e r n a r y   A r i t h m e t i c                      
   1.1+1.1      ->  1.0.¯1                     
  ¯1.¯1+¯1.¯1   ->  ¯1.0.1                     
   1.1-1.1      ->  0                          
  -1.1.1        -> ¯1.¯1.¯1                    
   1.1.1*1.1.1  ->  1.¯1.0.1.¯1.1              
  ¯1.1∧1.0      -> ¯1.0.1                      
   1.1∧1.0.¯1   ->  1.0.1.0.0.0.¯1.0.1.¯1.1    
   1.0. 1/1.¯1  ->  1.¯1.¯1                    
  ¯1.0.¯1/1.¯1  -> ¯1.1.1                      
   1.1.1%1.0.¯1 ->  1.¯1.¯1                    
   0/0          ->  1                          
   1/0          ->  ?                          

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   M a t h e m a t i c a l   d e f i n i t i o n s                            
   1+x+2                               -> x+3              
   -----x                              -> -x                                  
   1+x+y+z+x+y+z+2                     -> x+y+z+x+y+z+3    
   2*x*y*z*x*y*z*3                     -> 6*(x*y*z*x*y*z)  
   x∧x+y*x∧x                           -> (y+1)*x∧x                           
   x+x+x+x*x*x                         -> 3*x+x∧3                             
   2*x + x*3                           -> 5*x                                 
   x∧2 * x∧3                           -> x∧5                                 
   (x∧y)∧z                             -> x∧(y*z)                             
   (x+3-x)+(x*4/x)                     -> 7                                   
   x+y+z, x=y+y, y=z+z, z=3            -> 21                                  
   (2∧x+x∧2)∆x                         -> 0.69315*2∧x+2*x                     
   (ln(x∧x))∆x, x=2                    -> 1+⍟2                                
   (4*x∧3 + 3*x∧2 + 2*x∧1 + 1*x∧0)∆x   -> 12*x∧2+6*x+2                        
    sin(x)∧2 + cos(x)∧2,   x=42        ->  1                                  
   (sin(x)∧2 + cos(x)∧2)∆x             ->  0           
   (ln x)∆x∆x                          -> -1/x∧2       
   (ln x)∆x∆x∆x                        -> 2/x∧3        
   (ln x)∆x∆x∆x∆x∆x, x=1               -> 24           
   (ln x)∆x∆x∆x∆x∆x∆x                  -> -120/x∧6     
   ln exp ln exp 99                    -> 99                                  
   (x/exp(x))∆x                        -> (1-x)/exp(x)                        
   x+-3                                -> x-3                                 
   x/y∧-2                              -> x*y∧2                               
   2∆3                                 -> 2∆3                                 
   a+(b+(c+d))                         -> a+b+c+d      
   a*(b*(c*d))                         -> a*b*c*d      

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   R o m a n   N u m e r a l s     See →notes.roman←                          
                 I.I.I.I -> I.V                
               I.I.I.I.I -> V                                                 
             I.I.I.I.I.I -> V.I                                               
             I+I+I+I+I+I -> V.I                
                 I.V + I -> V                                                 
           V.I.I + V.I.I -> X.I.V                                             
               I.X + I.X -> X.V.I.I.I                                         
       X.L.I.X + X.L.I.X -> X.C.V.I.I.I                                       
                 M+M+M+M -> nimius                                            
                 X.X - I -> X.I.X              
                 V.I - V -> I                                                 
     X-I.I.I.I.I.I.I.I.I -> I                                                 
               X.X - I.I -> X.V.I.I.I                                         
             X.I.V - V.I -> V.I.I.I                                           
                 C.I - V -> X.C.V.I                                           
                 M.M - I -> M.C.M.X.C.I.X                                     
                   X-V-V -> nulla                                             
                 X-V-V-V -> absurdus                                          
           X.I.V × X.I.V -> C.X.C.V.I          
                   X×X×X -> M                                                 
                 X×X×X×X -> nimius                                            
             I.I × nulla -> nulla                                             
                   V ÷ I -> V                  
                   C ÷ X -> X                                                 
               X.I ÷ I.I -> V                                                 
           C.X.L.V ÷ V.I -> X.X.I.V                                           
                   V ÷ X -> nulla                                             
               X.I.I ÷ V -> I.I                                               
           C.X.L.V % V.I -> I                  
                   X % V -> nulla                                             
                   V % X -> V                                                 
               X.I.I % V -> I.I                                               
               ⍴ 1.9.9.9 -> M.C.M.X.C.I.X      
               ⍴ 3.9.9.9 -> M.M.M.C.M.X.C.I.X                                 
               ⍴ 4.0.0.0 -> nimius             
         ⍺ M.C.M.X.C.I.X -> 1.9.9.9            
     ⍺ M.M.M.C.M.X.C.I.X -> 3.9.9.9                                           
                  ⍺⍴ 4.9 -> 4.9                
          ⍴⍺ C.M.X.C.I.X -> C.M.X.C.I.X        
          ⍴⍺ C.D.X.L.I.V -> C.D.X.L.I.V        
         M + I.X × C.X.I -> M.C.M.X.C.I.X      

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   S i g n e d   B i n a r y   A r i t h m e t i c                        
    1.1+1.1                      ->  1.1.0             
   -1.1-1.1                      -> -1.1.0                                
    1.1+-1.1.1                   -> -1.0.0                                
   0-1-1-1-1                     -> -1.0.0                                
   -1.1*-1.1                     ->  1.0.0.1                              
   -1.1∧ 1.1                     -> -1.1.0.1.1         
    1.1∧-1                       ->  1.1∧-1            
   1.1.1/1.1                     ->  1.0                                  
   1.1.1/-1.1                    -> -1.0                                  
   -1.1.1/1.1                    -> -1.0                                  
   -1.1.1/-1.1                   ->  1.0                                  
   1.1.1%1.1                     ->  1                 
   1.1.1%-1.1                    ->  1                                    
   -1.1.1%1.1                    -> -1                                    
   -1.1.1%-1.1                   -> -1                                    
   1.1.1.1.1.0.1.0.0.0/1         ->  1.1.1.1.1.0.1.0.0.0                  
   1.1.1.1.1.1.1.1.1.1/1.1.1.1.1 ->  1.0.0.0.0.1                          

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   J a p a n e s e   A b a c u s         See →notes.soroban←             
     ⍵ ⍺ 1.2.3.4.5.6.7.8.9 -> 1.2.3.4.5.6.7.8.9    
     ⍺ ⍵ 0/1.1/0.1/2.1/3   -> 0/1.1/0.1/2.1/3      
                   0/0.0/0 -> 0/0                  
           ⍵ 0/0+7         -> 7                    
           ⍵ 0/0+7+7       -> 1.4                                        
           ⍵ 0/0+7+7+7     -> 2.1                                        
           ⍵ 0/0+7+7+7+7   -> 2.8                                        
           ⍵ 0/0+7+7+7+7+7 -> 3.5                                        
   ⍵ 0/0+1+2+3+4+5+6+7+8+9 -> 4.5                                        
   ⍵ 0/0+9+8+7+6+5+4+3+2+1 -> 4.5                                        
               ⍵ 0/0 + 1.2 -> 1.2                                        
   ⍵ 0/0 + 1.2 + 3.4 + 5.6 -> 1.0.2                                      
  ⍵ 0/0 + 1.2.3.4.5.6.7.8.9 + 9.8.7.6.5.4.3.2.1 -> 1.1.1.1.1.1.1.1.1.0   
       ⍵ 0/3.1/0-7         -> 2.8                  
       ⍵ 0/3.1/0-7-7       -> 2.1                                        
       ⍵ 0/3.1/0-7-7-7     -> 1.4                                        
       ⍵ 0/3.1/0-7-7-7-7   -> 7                                          
       ⍵ 0/3.1/0-7-7-7-7-7 -> 0                                          
  0/1.0/0.0/2 -1.2-3.4-5.6 -> 0/0                                        
   ⍵ (⍺ 1.1.1.1.1.1.1.1.1.0) - 1.2.3.4.5.6.7.8.9 -> 9.8.7.6.5.4.3.2.1    
   ⍵ (⍺ 1.1.1.1.1.1.1.1.1.0) - 9.8.7.6.5.4.3.2.1 -> 1.2.3.4.5.6.7.8.9    
  0/0 - 1   -> (0-1)/4                             
  1/1 - 2.3 -> 1/1-2.3                                                   

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝   S t a n d a r d   E x c e l - s t y l e   d e f i n i t i o n s         
   round(2/3, 2)                    -> 0.67    
   floor(123.456, 0.01)             -> 123.45  
   ceiling(123.456, 0.1)            -> 123.5   
   sum(min(1,2,3),max(4,5,6),7,8,9) -> 31      
   mod(10,7)                        -> 3       
   -2                               -> ¯2      
   2+-2                             -> 0       
   2∧2∧3                            -> 256     
   6/3*2                            -> 4       
   6-3+2                            -> 5       
   (6/(3*2)) ∧ (6-(3+2))            -> 1       
   2 3  !! missing operator                                                
   +3   !! missing operand                                                 
   3+   !! missing operand                                                 
   ()   !! null expression                                                 
   1/0  !! bad operand                                                     
   2(3) !! missing operator                                                
   (2)3 !! missing operator                                                
   3)   !! unexpected )                                                    
   ((3  !! missing ))                                                      

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
⍝ Native Tasmanian counting.           
   one + one       -> two             
   one + one + one -> plenty          
   plenty + plenty -> plenty          
   two two         !! missing operator
   plenty +        !! missing operand