File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
math /
pow_basic2.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 8 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
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));
?>
===Done===
--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)
===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>