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
32-- The following all result in INF --
33float(INF)
34float(INF)
35float(INF)
36
37
38-- The following all result in 0 --
39float(0)
40float(0)
41float(0)
42float(0)
43
44
45-- The following all result in -0 --
46float(%s)
47
48
49-- The following all result in -INF --
50float(-INF)
51float(-INF)
52===Done===