1--TEST--
2Test log1p() - basic function test log1p()
3--INI--
4precision=14
5--FILE--
6<?php
7echo "*** Testing log1p() : basic functionality ***\n";
8
9$values = array(23,
10                -23,
11                2.345e1,
12                -2.345e1,
13                0x17,
14                027,
15                "23",
16                "23.45",
17                "2.345e1",
18                null,
19                true,
20                false);
21
22echo "\n LOG1p tests\n";
23
24foreach($values as $value) {
25    echo "\n-- log1p $value --\n";
26    var_dump(log1p($value));
27};
28
29
30?>
31--EXPECT--
32*** Testing log1p() : basic functionality ***
33
34 LOG1p tests
35
36-- log1p 23 --
37float(3.1780538303479458)
38
39-- log1p -23 --
40float(NAN)
41
42-- log1p 23.45 --
43float(3.196630215920881)
44
45-- log1p -23.45 --
46float(NAN)
47
48-- log1p 23 --
49float(3.1780538303479458)
50
51-- log1p 23 --
52float(3.1780538303479458)
53
54-- log1p 23 --
55float(3.1780538303479458)
56
57-- log1p 23.45 --
58float(3.196630215920881)
59
60-- log1p 2.345e1 --
61float(3.196630215920881)
62
63-- log1p  --
64float(0)
65
66-- log1p 1 --
67float(0.6931471805599453)
68
69-- log1p  --
70float(0)
71