xref: /PHP-7.3/ext/standard/tests/math/exp_basic.phpt (revision b746e698)
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--EXPECT--
31-- Iteration 1 --
32float(22026.465794807)
33
34-- Iteration 2 --
35float(29732.618852891)
36
37-- Iteration 3 --
38float(INF)
39
40-- Iteration 4 --
41float(29048849665247)
42
43-- Iteration 5 --
44float(1.811239082889E+41)
45
46-- Iteration 6 --
47float(22026.465794807)
48
49-- Iteration 7 --
50float(INF)
51
52-- Iteration 8 --
53float(INF)
54
55-- Iteration 9 --
56float(8.6593400423994E+16)
57
58-- Iteration 10 --
59float(2.718281828459)
60
61-- Iteration 11 --
62float(1)
63
64-- Iteration 12 --
65float(1)
66===Done===
67