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