PennMUSH Community
Show
Ignore:
Timestamp:
12/28/07 19:57:17 (1 year ago)
Author:
shawnw
Message:

Merge devel into trunk for p6 release

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/trunk/test/testmath.pl

    r1117 r1167  
    77test('abs.6', $god, 'think abs(99999999999)', '99999999999'); 
    88test('abs.7', $god, 'think abs(-99999999999)', '99999999999'); 
    9 test('trig.1',$god, 'think cos(90,d)', '^-?0\s*$'); 
    10 test('trig.2',$god, 'think cos(pi(),r)', '^-1\s*$'); 
    11 test('trig.3',$god, 'think cos(pi())', '^-1\s*$'); 
    12 test('trig.4',$god, 'think acos(cos(90,d),d)', '^90\s*$'); 
    13 test('trig.5',$god, 'think acos(cos(1,r))', '^1\s*$'); 
    14 test('trig.6',$god, 'think acos(cos(1,r),r)', '^1\s*$'); 
    15 test('trig.7',$god, 'think sin(90,d)', '^1\s*$'); 
    16 test('trig.8',$god, 'think sin(pi(),r)', '^-?0\s*$'); 
    17 test('trig.9',$god, 'think sin(pi())', '^-?0\s*$'); 
    18 test('trig.10',$god, 'think asin(sin(90,d),d)', '^90\s*$'); 
    19 test('trig.11',$god, 'think asin(sin(1,r))', '^1\s*$'); 
    20 test('trig.12',$god, 'think asin(sin(1,r),r)', '^1\s*$'); 
    21 test('trig.13',$god, 'think tan(45,d)', '^1\s*$'); 
    22 test('trig.14',$god, 'think tan(pi(),r)', '^-?0\s*$'); 
    23 test('trig.15',$god, 'think tan(pi())', '^-?0\s*$'); 
    24 test('trig.16',$god, 'think atan(tan(45,d),d)', '^45\s*$'); 
    25 test('trig.17',$god, 'think atan(tan(1,r))', '^1\s*$'); 
    26 test('trig.18',$god, 'think atan(tan(1,r),r)', '^1\s*$'); 
    27 test('trig.19',$god, 'think ctu(90,d,r)', '^1.570\d*\s*$'); 
    28 test('trig.20',$god, 'think ctu(pi(),r,d)','^180(\.00\d*)?\s*$'); 
     9 
     10test('cos.1',$god, 'think cos(90,d)', '^-?0\s*$'); 
     11test('cos.2',$god, 'think cos(pi(),r)', '^-1\s*$'); 
     12test('cos.3',$god, 'think cos(pi())', '^-1\s*$'); 
     13 
     14test('acos.1',$god, 'think acos(cos(90,d),d)', '^90\s*$'); 
     15test('acos.2',$god, 'think acos(cos(1,r))', '^1\s*$'); 
     16test('acos.3',$god, 'think acos(cos(1,r),r)', '^1\s*$'); 
     17 
     18test('sin.1',$god, 'think sin(90,d)', '^1\s*$'); 
     19test('sin.2',$god, 'think sin(pi(),r)', '^-?0\s*$'); 
     20test('sin.3',$god, 'think sin(pi())', '^-?0\s*$'); 
     21 
     22test('asin.1',$god, 'think asin(sin(90,d),d)', '^90\s*$'); 
     23test('asin.2',$god, 'think asin(sin(1,r))', '^1\s*$'); 
     24test('asin.3',$god, 'think asin(sin(1,r),r)', '^1\s*$'); 
     25 
     26test('tan.1',$god, 'think tan(45,d)', '^1\s*$'); 
     27test('tan.2',$god, 'think tan(pi(),r)', '^-?0\s*$'); 
     28test('tan.3',$god, 'think tan(pi())', '^-?0\s*$'); 
     29 
     30test('atan.1',$god, 'think atan(tan(45,d),d)', '^45\s*$'); 
     31test('atan.2',$god, 'think atan(tan(1,r))', '^1\s*$'); 
     32test('atan.3',$god, 'think atan(tan(1,r),r)', '^1\s*$'); 
     33 
     34test('ctu.1',$god, 'think ctu(90,d,r)', '^1.570\d*\s*$'); 
     35test('ctu.2',$god, 'think ctu(pi(),r,d)','^180(\.00\d*)?\s*$'); 
     36 
     37test('sqrt.1', $god, 'think sqrt(4)', '2'); 
     38test('sqrt.2', $god, 'think sqrt(-1)', '#-1 IMAGINARY NUMBER'); 
     39 
     40test('root.1', $god, 'think root(4,2)', '2'); 
     41test('root.2', $god, 'think root(-1,2)', '#-1 IMAGINARY NUMBER'); 
     42test('root.3', $god, 'think root(27, 3)', '3'); 
     43test('root.4', $god, 'think root(-27, 3)', '-3'); 
     44$god->command('@config/set float_precision=10'); 
     45test('root.5', $god, 'think root(125, 5)', '2.6265278044');