xref: /PHP-7.0/ext/standard/tests/math/exp_basic.phpt (revision d133e68b)
1--TEST--
2Test exp() - basic function test for exp()
3--INI--
4precision=14
5--FILE--
6<?php
7$values = array(10,
8				10.3,
9				3.9505e3,
10				037,
11				0x5F,
12				"10",
13				"3950.5",
14				"3.9505e3",
15				"039",
16				true,
17				false,
18				null,
19				);
20
21$iterator = 1;
22foreach($values as $value) {
23	echo "\n-- Iteration $iterator --\n";
24	var_dump(exp($value));
25	$iterator++;
26};
27
28?>
29===Done===
30--EXPECTF--
31
32-- Iteration 1 --
33float(22026.465794807)
34
35-- Iteration 2 --
36float(29732.618852891)
37
38-- Iteration 3 --
39float(INF)
40
41-- Iteration 4 --
42float(29048849665247)
43
44-- Iteration 5 --
45float(1.811239082889E+41)
46
47-- Iteration 6 --
48float(22026.465794807)
49
50-- Iteration 7 --
51float(INF)
52
53-- Iteration 8 --
54float(INF)
55
56-- Iteration 9 --
57float(8.6593400423994E+16)
58
59-- Iteration 10 --
60float(2.718281828459)
61
62-- Iteration 11 --
63float(1)
64
65-- Iteration 12 --
66float(1)
67===Done===
68