Annotation of embedaddon/php/ext/standard/tests/math/pow_basic2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test pow() - basic function test pow() - with large exponents
! 3: --INI--
! 4: precision=14
! 5: --FILE--
! 6: <?php
! 7:
! 8: $large_exp = 20000;
! 9:
! 10: echo "\n-- The following all result in INF --\n";
! 11: var_dump(pow(24, $large_exp));
! 12: var_dump(pow(0.24, -$large_exp));
! 13: var_dump(pow(-0.24, -$large_exp));
! 14:
! 15: echo "\n\n-- The following all result in 0 --\n";
! 16: var_dump(pow(0.24, $large_exp));
! 17: var_dump(pow(-0.24, $large_exp));
! 18: var_dump(pow(24, -$large_exp));
! 19: var_dump(pow(-24, -$large_exp));
! 20:
! 21: echo "\n\n-- The following all result in -0 --\n";
! 22: var_dump(pow(-0.24, $large_exp+1));
! 23:
! 24: echo "\n\n-- The following all result in -INF --\n";
! 25: var_dump(pow(-24, $large_exp+1));
! 26: var_dump(pow(-0.24, -$large_exp+1));
! 27:
! 28: ?>
! 29: ===Done===
! 30: --EXPECTF--
! 31:
! 32: -- The following all result in INF --
! 33: float(INF)
! 34: float(INF)
! 35: float(INF)
! 36:
! 37:
! 38: -- The following all result in 0 --
! 39: float(0)
! 40: float(0)
! 41: float(0)
! 42: float(0)
! 43:
! 44:
! 45: -- The following all result in -0 --
! 46: float(%s)
! 47:
! 48:
! 49: -- The following all result in -INF --
! 50: float(-INF)
! 51: float(-INF)
! 52: ===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>