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 true, 19 false); 20 21echo "\n LOG1p tests\n"; 22 23foreach($values as $value) { 24 echo "\n-- log1p $value --\n"; 25 var_dump(log1p($value)); 26}; 27 28 29?> 30--EXPECT-- 31*** Testing log1p() : basic functionality *** 32 33 LOG1p tests 34 35-- log1p 23 -- 36float(3.1780538303479458) 37 38-- log1p -23 -- 39float(NAN) 40 41-- log1p 23.45 -- 42float(3.196630215920881) 43 44-- log1p -23.45 -- 45float(NAN) 46 47-- log1p 23 -- 48float(3.1780538303479458) 49 50-- log1p 23 -- 51float(3.1780538303479458) 52 53-- log1p 23 -- 54float(3.1780538303479458) 55 56-- log1p 23.45 -- 57float(3.196630215920881) 58 59-- log1p 2.345e1 -- 60float(3.196630215920881) 61 62-- log1p 1 -- 63float(0.6931471805599453) 64 65-- log1p -- 66float(0) 67