## evaluaion tests for the core tdl language.
## this is focussed on evaluation *results*
##   (see core_parsing.txt for tests of the parse expression stack representation)
##
# 
1+2*3                    =>  7                
-pi/3                    => -1.0471975512     
2*(4/3)                  =>  2.6666666667     
2*4/3                    =>  2.6666666667     
2*(4+3)                  =>  14               
2*4+3                    =>  11               
5/2+3                    =>  5.5              
5/2*3                    =>  7.5              
6/2/3                    =>    1              
2^3+3                    =>  4             
2**(3+3)                 =>  64              
2**(3*3)                 =>  512              
+3                       =>   3               
3 * -2                   =>  -6               
-3**2                    =>  -9               
2**3**2                  =>  512              
2**4 + 1                 =>  17               
8*3**2 + 2               =>  74               
-1**3                    =>  -1
x + y => 5
cos(0.1)                 => 0.9950041653      
sin(0.1)                 => 0.0998334166      
sin(pi/2 - tan(0.1))     => 0.9949706981      
tan(0.2 + 1.0j)          => (0.0831511848,0.7744312669j)
e**(1j*pi) + 1           => (0.,0.j)
f3(2.0,5)                => 10.
a[2] + 3                 =>   5             
b[2][4]                  => 20
a[3+1]                   => 4

x == 2                   =>  False    
x == 3                   =>  True     
x != 3                   =>  False    
x >= 1                   =>  True     
x >= 3                   =>  True     
x >= 4                   =>  False    
x < 99                   =>  True     
(x>u) or x*u>100         =>  True     
yes and no or nottrue     =>  False   
yes and (no or nottrue)   =>  False   
(yes and no) or nottrue   =>  False   
yes or no and nottrue     =>  True    
yes or (no and nottrue)   =>  True    
(yes or no) and nottrue   =>  False   
yes or not no             =>  True    
not (no or yes)           =>  False   
not no or yes             =>  True    
not yes                   =>  False   
not no                    =>  True    
a[0]                      =>  0.      
a[1]                      =>  1.      
a[0] and a[1]             =>  0.      
not a[0]                  =>  True    
not a[1]                  =>  False   
not a[2]                  =>  False   

f1(2,8.0)                 =>  1.      
f1(2,2*7.,c=11.0)         =>  1.4545454545 

f1(2,8.0,c=sin(0.3))      =>  33.8386336182 
f2()                      =>   50.0   
f2(c=99)                  =>  49.5    
f2(d=88)                  =>  50.0    
max(a[3]*01,9,3)          =>   9    
sqrt(33.2j / cos(88.0))  => (4.0755870761,4.0755870761j) 

adict['b']                =>    2     

adict['c'] /adict['b']    =>  1.5    
0.2                       =>  0.2
.2                        =>   .2     
0.223e+4                  => 0.223e+4 
.32101e+3j                => (0,.32101e+3j) 
 
adict                     =>  {'a': 1.0, 'c': 3.0, 'b': 2.0}  


[1,2,['a', 'b','c'], 4.0] => [1, 2, ['a', 'b', 'c'], 4.0] 
alist[2]                  =>  ['a', 'b', 'c', 'd']  
{'a':1, 'b':2.0, 'c':[1,2,'three']} => {'a': 1, 'c': [1, 2, 'three'], 'b': 2.0} 
alist                     =>   [[1.0, 2.0, 3.0, 4.0], [6.0, 7.0, 8.0, 9.0], ['a', 'b', 'c', 'd']]  


-(a[3:5] + 2)             =>  [-5. -6.]  
-a[3:7] + 2.0             =>  [-1. -2. -3. -4.]  

a[2:]                    =>   [ 2.  3.  4.  5.  6.]
'a simple string '        => 'a simple string '
alist[2][3]               =>  'd'
[0,1,2,4,8,16,32]         =>  [0, 1, 2, 4, 8, 16, 32]
alist[1]                  =>  [6.0, 7.0, 8.0, 9.0]
f3(2.5,b)[3,4]            =>  70.0   


b[2:4,3]                   =>  [19 27]  
b[2:4,3:5]                 =>  [[19 20] [27 28]]  
b[2:4]                     =>  [[16 17 18 19 20 21 22 23] [24 25 26 27 28 29 30 31]]  
f3(2.5,b)[3]               =>  [ 60.   62.5  65.   67.5  70.   72.5 75. 77.5]  
sin(a*pi/20)               =>  [0.    0.15643447  0.30901699  0.4539905   0.58778525  0.70710678  0.80901699] 

 
' %s = %g '  % ('sqrt(22.3)',sqrt(22.3))   => ' sqrt(22.3) = 4.72229 ' 

## passes until here

## test isn't checking results correctly:



