xref: /PHP-5.3/ext/standard/tests/math/exp_basic.phpt (revision a7bdc765)
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				"0x5F",
17				true,
18				false,
19				null,
20				);
21
22$iterator = 1;
23foreach($values as $value) {
24	echo "\n-- Iteration $iterator --\n";
25	var_dump(exp($value));
26	$iterator++;
27};
28
29?>
30===Done===
31--EXPECTF--
32
33-- Iteration 1 --
34float(22026.465794807)
35
36-- Iteration 2 --
37float(29732.618852891)
38
39-- Iteration 3 --
40float(INF)
41
42-- Iteration 4 --
43float(29048849665247)
44
45-- Iteration 5 --
46float(1.811239082889E+41)
47
48-- Iteration 6 --
49float(22026.465794807)
50
51-- Iteration 7 --
52float(INF)
53
54-- Iteration 8 --
55float(INF)
56
57-- Iteration 9 --
58float(8.6593400423994E+16)
59
60-- Iteration 10 --
61float(1.811239082889E+41)
62
63-- Iteration 11 --
64float(2.718281828459)
65
66-- Iteration 12 --
67float(1)
68
69-- Iteration 13 --
70float(1)
71===Done===