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