1--TEST-- 2Test return type and value for expected input log10() 3--INI-- 4precision = 14 5--FILE-- 6<?php 7/* 8 * proto float log10(float number) 9 * Function is implemented in ext/standard/math.c 10*/ 11 12$file_path = dirname(__FILE__); 13require($file_path."/allowed_rounding_error.inc"); 14 15$arg_0 = 1.0; 16$arg_1 = 10.0; 17$arg_2 = 100.0; 18 19echo "log10 $arg_0 = "; 20$r0 = log10($arg_0); 21var_dump($r0); 22if (allowed_rounding_error($r0 ,0.0 )) { 23 echo "Pass\n"; 24} 25else { 26 echo "Fail\n"; 27} 28 29echo "log10 $arg_1 = "; 30$r1 = log10($arg_1); 31var_dump($r1); 32if (allowed_rounding_error($r1 ,1.0 )) { 33 echo "Pass\n"; 34} 35else { 36 echo "Fail\n"; 37} 38 39echo "log10 $arg_2 = "; 40$r2 = log10($arg_2); 41var_dump($r2); 42if (allowed_rounding_error($r2 ,2.0 )) { 43 echo "Pass\n"; 44} 45else { 46 echo "Fail\n"; 47} 48?> 49--EXPECTF-- 50log10 1 = float(%f) 51Pass 52log10 10 = float(%f) 53Pass 54log10 100 = float(%f) 55Pass 56