Lines Matching refs:tmp_value
97 double tmp_value; in php_round_helper() local
100 tmp_value = floor(value + 0.5); in php_round_helper()
101 if ((mode == PHP_ROUND_HALF_DOWN && value == (-0.5 + tmp_value)) || in php_round_helper()
102 (mode == PHP_ROUND_HALF_EVEN && value == (0.5 + 2 * floor(tmp_value/2.0))) || in php_round_helper()
103 (mode == PHP_ROUND_HALF_ODD && value == (0.5 + 2 * floor(tmp_value/2.0) - 1.0))) in php_round_helper()
105 tmp_value = tmp_value - 1.0; in php_round_helper()
108 tmp_value = ceil(value - 0.5); in php_round_helper()
109 if ((mode == PHP_ROUND_HALF_DOWN && value == (0.5 + tmp_value)) || in php_round_helper()
110 (mode == PHP_ROUND_HALF_EVEN && value == (-0.5 + 2 * ceil(tmp_value/2.0))) || in php_round_helper()
111 (mode == PHP_ROUND_HALF_ODD && value == (-0.5 + 2 * ceil(tmp_value/2.0) + 1.0))) in php_round_helper()
113 tmp_value = tmp_value + 1.0; in php_round_helper()
117 return tmp_value; in php_round_helper()
128 double tmp_value; in _php_math_round() local
148 tmp_value = value * f2; in _php_math_round()
150 tmp_value = value / f2; in _php_math_round()
154 tmp_value = php_round_helper(tmp_value, mode); in _php_math_round()
161 tmp_value = tmp_value / f2; in _php_math_round()
165 tmp_value = value * f1; in _php_math_round()
167 tmp_value = value / f1; in _php_math_round()
170 if (fabs(tmp_value) >= 1e15) { in _php_math_round()
176 tmp_value = php_round_helper(tmp_value, mode); in _php_math_round()
181 tmp_value = tmp_value / f1; in _php_math_round()
183 tmp_value = tmp_value * f1; in _php_math_round()
195 snprintf(buf, 39, "%15fe%d", tmp_value, -places); in _php_math_round()
197 tmp_value = zend_strtod(buf, NULL); in _php_math_round()
199 if (!zend_finite(tmp_value) || zend_isnan(tmp_value)) { in _php_math_round()
200 tmp_value = value; in _php_math_round()
204 return tmp_value; in _php_math_round()