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 "0x5F", 24 true, 25 false, 26 null, 27 ); 28 29// loop through each element of $values to check the behaviour of expm1() 30$iterator = 1; 31foreach($values as $value) { 32 echo "\n-- Iteration $iterator --\n"; 33 var_dump(expm1($value)); 34 $iterator++; 35}; 36?> 37===Done=== 38--EXPECTF-- 39*** Testing expm1() : basic functionality *** 40 41-- Iteration 1 -- 42float(22025.465794807) 43 44-- Iteration 2 -- 45float(29731.618852891) 46 47-- Iteration 3 -- 48float(INF) 49 50-- Iteration 4 -- 51float(29048849665246) 52 53-- Iteration 5 -- 54float(1.811239082889E+41) 55 56-- Iteration 6 -- 57float(22025.465794807) 58 59-- Iteration 7 -- 60float(INF) 61 62-- Iteration 8 -- 63float(INF) 64 65-- Iteration 9 -- 66float(8.6593400423994E+16) 67 68-- Iteration 10 -- 69float(1.811239082889E+41) 70 71-- Iteration 11 -- 72float(1.718281828459) 73 74-- Iteration 12 -- 75float(0) 76 77-- Iteration 13 -- 78float(0) 79===Done===