summaryrefslogtreecommitdiff
path: root/ext/standard/tests/math/atanh_basic.phpt
blob: 7bb253df8c7eba7b5e7347c75cc6c83b784f9e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--TEST--
Test return type and value for expected input atanh()
--INI--
precision = 14
--FILE--
<?php
/*
 * Function is implemented in ext/standard/math.c
*/

$file_path = __DIR__;
require($file_path."/allowed_rounding_error.inc");

echo "atanh  0.46211715726001 = ";
var_dump(atanh(0.46211715726001));
if (allowed_rounding_error(atanh(0.46211715726001), 0.5))
{
    echo "Pass\n";
}
else {
    echo "Fail\n";
}

echo "atanh  0.99505475368673 = ";
var_dump(atanh(0.99505475368673));
if (allowed_rounding_error(atanh(0.99505475368673), 3.0))
{
    echo "Pass\n";
}
else {
    echo "Fail\n";
}


?>
--EXPECTF--
atanh  0.46211715726001 = float(%f)
Pass
atanh  0.99505475368673 = float(%f)
Pass