1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/math/pow_basic2.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

50 lines
950 B
PHP

--TEST--
Test pow() - basic function test pow() - with large exponents
--INI--
precision=14
--FILE--
<?php
$large_exp = 20000;
echo "\n-- The following all result in INF --\n";
var_dump(pow(24, $large_exp));
var_dump(pow(0.24, -$large_exp));
var_dump(pow(-0.24, -$large_exp));
echo "\n\n-- The following all result in 0 --\n";
var_dump(pow(0.24, $large_exp));
var_dump(pow(-0.24, $large_exp));
var_dump(pow(24, -$large_exp));
var_dump(pow(-24, -$large_exp));
echo "\n\n-- The following all result in -0 --\n";
var_dump(pow(-0.24, $large_exp+1));
echo "\n\n-- The following all result in -INF --\n";
var_dump(pow(-24, $large_exp+1));
var_dump(pow(-0.24, -$large_exp+1));
?>
--EXPECTF--
-- The following all result in INF --
float(INF)
float(INF)
float(INF)
-- The following all result in 0 --
float(0)
float(0)
float(0)
float(0)
-- The following all result in -0 --
float(%s)
-- The following all result in -INF --
float(-INF)
float(-INF)