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