Annotation of embedaddon/php/ext/standard/tests/math/tan_variation.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test variations in usage of tan()
        !             3: --INI--
        !             4: precision = 10
        !             5: --FILE--
        !             6: <?php
        !             7: /* 
        !             8:  * proto float tan(float number)
        !             9:  * Function is implemented in ext/standard/math.c
        !            10: */ 
        !            11: 
        !            12: 
        !            13: //Test tan with a different input values
        !            14: 
        !            15: $values = array(23,
        !            16:                -23,
        !            17:                2.345e1,
        !            18:                -2.345e1,
        !            19:                0x17,
        !            20:                027,
        !            21:                "23",
        !            22:                "23.45",
        !            23:                "2.345e1",
        !            24:                "nonsense",                             
        !            25:                "1000",
        !            26:                "1000ABC",
        !            27:                null,
        !            28:                true,
        !            29:                false); 
        !            30: 
        !            31: for ($i = 0; $i < count($values); $i++) {
        !            32:        $res = tan($values[$i]);
        !            33:        var_dump($res);
        !            34: }
        !            35: 
        !            36: ?>
        !            37: --EXPECTF--
        !            38: float(1.588153083)
        !            39: float(-1.588153083)
        !            40: float(8.895619796)
        !            41: float(-8.895619796)
        !            42: float(1.588153083)
        !            43: float(1.588153083)
        !            44: float(1.588153083)
        !            45: float(8.895619796)
        !            46: float(8.895619796)
        !            47: 
        !            48: Warning: tan() expects parameter 1 to be double, string given in %s on line %d
        !            49: NULL
        !            50: float(1.470324156)
        !            51: 
        !            52: Notice: A non well formed numeric value encountered in %s on line %d
        !            53: float(1.470324156)
        !            54: float(0)
        !            55: float(1.557407725)
        !            56: float(0)

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