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