Home
last modified time | relevance | path

Searched refs:precision (Results 1 – 25 of 413) sorted by relevance

12345678910>>...17

/php-src/ext/standard/tests/math/
H A Dnumber_format_basiclong_64bit.phpt40 echo "... with precision " . $precision . ": ";
56 ... with precision -20: string(1) "0"
67 ... with precision -20: string(1) "0"
74 ... with precision -10: string(1) "0"
75 ... with precision -11: string(1) "0"
76 ... with precision -17: string(1) "0"
77 ... with precision -19: string(1) "0"
78 ... with precision -20: string(1) "0"
85 ... with precision -10: string(1) "0"
86 ... with precision -11: string(1) "0"
[all …]
H A Dround_modes.phpt55 precision: -1
75 precision: 0
95 precision: 1
115 precision: 2
135 precision: 10
156 precision: -1
176 precision: 0
196 precision: 1
216 precision: 2
277 precision: 0
[all …]
H A Dround_basic.phpt4 precision=14
19 $precision = array(2,
35 echo "...with precision $precision[$j]-> ";
72 ...with precision 1-> float(123.5)
73 ...with precision -> float(123)
75 ...with precision 2-> float(-4.57)
88 ...with precision 1-> float(-4.6)
89 ...with precision -> float(-5)
105 ...with precision -> float(12300)
168 ...with precision 1-> float(1.2)
[all …]
H A Dround_modes_zeros.phpt33 precision: -1
39 precision: 0
45 precision: 1
51 precision: 2
64 precision: 0
70 precision: 1
76 precision: 2
89 precision: 0
95 precision: 1
101 precision: 2
[all …]
/php-src/ext/bcmath/libbcmath/src/
H A Dround.c21 void bc_round(bc_num num, zend_long precision, zend_long mode, bc_num *result) in bc_round() argument
36 if (precision < 0 && num->n_len < (size_t) (-(precision + Z_L(1))) + 1) { in bc_round()
41 if (precision >= 0 && num->n_scale <= precision) { in bc_round()
42 if (num->n_scale == precision) { in bc_round()
44 } else if(num->n_scale < precision) { in bc_round()
45 *result = bc_new_num(num->n_len, precision); in bc_round()
56 size_t rounded_len = num->n_len + precision; in bc_round()
66 *result = bc_new_num(num->n_len, precision > 0 ? precision : 0); in bc_round()
/php-src/tests/basic/
H A Dprecision.phpt2 precision setting test
4 precision=14
11 ini_set('precision', -1);
13 echo ini_get('precision'), PHP_EOL;
22 ini_set('precision', 0);
24 echo ini_get('precision'), PHP_EOL;
32 ini_set('precision', 9);
42 ini_set('precision', 14);
52 ini_set('precision', 17);
62 ini_set('precision', 25);
[all …]
/php-src/ext/bcmath/tests/
H A Dbcround_test_helper.inc5 foreach ($cases as [$num, $precision]) {
6 …echo str_pad("[{$num}, {$precision}]", 17, ' ', STR_PAD_LEFT), " => ", bcround($num, $precision, $…
100 echo "========== minus precision ==========\n";
103 echo "========== zero precision ==========\n";
106 echo "========== plus precision ==========\n";
H A Dbcround_early_return.phpt34 foreach ($early_return_cases as [$num, $precision]) {
35 …$result = str_pad("[{$num}, {$precision}]", 33, ' ', STR_PAD_LEFT) . ' => ' . bcround($num, $preci…
44 foreach ($early_return_cases as [$num, $precision]) {
45 …$result = str_pad("[{$num}, {$precision}]", 33, ' ', STR_PAD_LEFT) . ' => ' . bcround($num, $preci…
H A Dbcround_floor.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_toward_zero.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_away_from_zero.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_ceiling.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_half_down.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_half_even.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_half_odd.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
H A Dbcround_half_up.phpt29 ========== minus precision ==========
45 ========== zero precision ==========
65 ========== plus precision ==========
/php-src/Zend/tests/float_to_int/
H A Dwarnings_string_float_vars.phpt77 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
80 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
83 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
86 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
89 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
92 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
95 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
98 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
101 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
105 Deprecated: Implicit conversion from float-string "6.5" to int loses precision in %s on line %d
[all …]
H A Dwarnings_string_float_literals.phpt57 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
60 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
63 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
66 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
69 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
72 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
75 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
79 Deprecated: Implicit conversion from float-string "6.5" to int loses precision in %s on line %d
82 Deprecated: Implicit conversion from float-string "2.5" to int loses precision in %s on line %d
86 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
[all …]
H A Dwarnings_float_literals.phpt74 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
77 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
80 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
83 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
86 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
89 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
92 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
95 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
99 Deprecated: Implicit conversion from float 6.5 to int loses precision in %s on line %d
102 Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d
[all …]
H A Dwarnings_float_vars.phpt96 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
99 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
102 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
105 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
108 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
111 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
114 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
117 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
120 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
123 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
[all …]
H A Dwarnings_float_literals_assignment_ops.phpt37 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
40 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
43 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
46 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
49 Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
53 Deprecated: Implicit conversion from float 2.5 to int loses precision in %s on line %d
H A Dwarnings_string_float_literals_assignment_ops.phpt37 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
40 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
43 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
46 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
49 Deprecated: Implicit conversion from float-string "1.5" to int loses precision in %s on line %d
53 Deprecated: Implicit conversion from float-string "2.5" to int loses precision in %s on line %d
/php-src/ext/bcmath/tests/number/operators/
H A Dcalc_float.phpt17 Deprecated: Implicit conversion from float 1.01 to int loses precision in %s
19 Deprecated: Implicit conversion from float 1.01 to int loses precision in %s
21 Deprecated: Implicit conversion from float 1.01 to int loses precision in %s
23 Deprecated: Implicit conversion from float 1.01 to int loses precision in %s
25 Deprecated: Implicit conversion from float 1.01 to int loses precision in %s
27 Deprecated: Implicit conversion from float 1.01 to int loses precision in %s
/php-src/main/
H A Dspprintf.c187 int precision = 0; in xbuf_format_converter() local
279 STR_TO_DEC(fmt, precision); in xbuf_format_converter()
281 precision = va_arg(ap, int); in xbuf_format_converter()
283 if (precision < -1) in xbuf_format_converter()
284 precision = -1; in xbuf_format_converter()
286 precision = 0; in xbuf_format_converter()
370 s_len = precision; in xbuf_format_converter()
379 s_len = precision; in xbuf_format_converter()
641 precision = FLOAT_DIGITS; in xbuf_format_converter()
642 else if (precision == 0) in xbuf_format_converter()
[all …]
H A Dsnprintf.c278 if (precision >= NDIG - 1) { in php_conv_fp()
279 precision = NDIG - 2; in php_conv_fp()
302 if (precision > 0) { in php_conv_fp()
326 if (precision > 0 || add_dp) { in php_conv_fp()
484 int precision = 0; in format_converter() local
583 if (precision < -1) in format_converter()
584 precision = -1; in format_converter()
586 precision = 0; in format_converter()
670 s_len = precision; in format_converter()
846 s_len = precision; in format_converter()
[all …]

Completed in 27 milliseconds

12345678910>>...17