1--TEST--
2Test expm1() - basic function test for expm1()
3--INI--
4precision=14
5--FILE--
6<?php
7/* Prototype  : float expm1 ( float $arg  )
8 * Description: Returns exp(number) - 1, computed in a way that is accurate even
9 *              when the value of number is close to zero.
10 * Source code: ext/standard/math.c
11 */
12
13echo "*** Testing expm1() : basic functionality ***\n";
14$values = array(10,
15				10.3,
16				3.9505e3,
17				037,
18				0x5F,
19				"10",
20				"3950.5",
21				"3.9505e3",
22				"039",
23				true,
24				false,
25				null,
26				);
27
28// loop through each element of $values to check the behaviour of expm1()
29$iterator = 1;
30foreach($values as $value) {
31	echo "\n-- Iteration $iterator --\n";
32	var_dump(expm1($value));
33	$iterator++;
34};
35?>
36===Done===
37--EXPECT--
38*** Testing expm1() : basic functionality ***
39
40-- Iteration 1 --
41float(22025.465794807)
42
43-- Iteration 2 --
44float(29731.618852891)
45
46-- Iteration 3 --
47float(INF)
48
49-- Iteration 4 --
50float(29048849665246)
51
52-- Iteration 5 --
53float(1.811239082889E+41)
54
55-- Iteration 6 --
56float(22025.465794807)
57
58-- Iteration 7 --
59float(INF)
60
61-- Iteration 8 --
62float(INF)
63
64-- Iteration 9 --
65float(8.6593400423994E+16)
66
67-- Iteration 10 --
68float(1.718281828459)
69
70-- Iteration 11 --
71float(0)
72
73-- Iteration 12 --
74float(0)
75===Done===
76