Annotation of embedaddon/php/ext/standard/tests/math/tan_basiclong_64bit.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Test tan function : 64bit long tests
1.1.1.2 ! misho       3: --INI--
        !             4: precision=5
1.1       misho       5: --SKIPIF--
                      6: <?php
                      7: if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11:  
                     12: define("MAX_64Bit", 9223372036854775807);
                     13: define("MAX_32Bit", 2147483647);
                     14: define("MIN_64Bit", -9223372036854775807 - 1);
                     15: define("MIN_32Bit", -2147483647 - 1);
                     16: 
                     17: $longVals = array(
                     18:     MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
                     19:     MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
                     20:     MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
                     21: );
                     22: 
                     23: 
                     24: foreach ($longVals as $longVal) {
                     25:    echo "--- testing: $longVal ---\n";
                     26:    var_dump(tan($longVal));
                     27: }
                     28:    
                     29: ?>
                     30: ===DONE===
                     31: --EXPECT--
                     32: --- testing: 9223372036854775807 ---
1.1.1.2 ! misho      33: float(84.739)
1.1       misho      34: --- testing: -9223372036854775808 ---
1.1.1.2 ! misho      35: float(-84.739)
1.1       misho      36: --- testing: 2147483647 ---
1.1.1.2 ! misho      37: float(1.0524)
1.1       misho      38: --- testing: -2147483648 ---
1.1.1.2 ! misho      39: float(4.0843)
1.1       misho      40: --- testing: 9223372034707292160 ---
1.1.1.2 ! misho      41: float(-0.25739)
1.1       misho      42: --- testing: -9223372034707292160 ---
1.1.1.2 ! misho      43: float(0.25739)
1.1       misho      44: --- testing: 2147483648 ---
1.1.1.2 ! misho      45: float(-4.0843)
1.1       misho      46: --- testing: -2147483649 ---
1.1.1.2 ! misho      47: float(0.34328)
1.1       misho      48: --- testing: 4294967294 ---
1.1.1.2 ! misho      49: float(-19.579)
1.1       misho      50: --- testing: 4294967295 ---
1.1.1.2 ! misho      51: float(-0.57225)
1.1       misho      52: --- testing: 4294967293 ---
1.1.1.2 ! misho      53: float(0.71667)
1.1       misho      54: --- testing: 9223372036854775806 ---
1.1.1.2 ! misho      55: float(84.739)
        !            56: --- testing: 9.2234E+18 ---
        !            57: float(84.739)
1.1       misho      58: --- testing: -9223372036854775807 ---
1.1.1.2 ! misho      59: float(-84.739)
        !            60: --- testing: -9.2234E+18 ---
        !            61: float(-84.739)
1.1       misho      62: ===DONE===
1.1.1.2 ! misho      63: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>