1--TEST-- 2Test return type and value for expected input atan() 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 14echo "atan 1.7320508075689 = "; 15$atan1 = 360 * atan(1.7320508075689) / (2.0 * M_PI); 16var_dump($atan1); 17if (allowed_rounding_error($atan1 ,60 )) { 18 echo "Pass\n"; 19} 20else { 21 echo "Fail\n"; 22} 23 24echo "atan 0.57735026918963 = "; 25$atan2 = 360 * atan(0.57735026918963) / (2.0 * M_PI); 26var_dump($atan2); 27if (allowed_rounding_error($atan2 ,30 )) { 28 echo "Pass\n"; 29} 30else { 31 echo "Fail\n"; 32} 33 34?> 35--EXPECTF-- 36atan 1.7320508075689 = float(%f) 37Pass 38atan 0.57735026918963 = float(%f) 39Pass 40