Home
last modified time | relevance | path

Searched refs:round (Results 1 – 25 of 41) sorted by relevance

12

/PHP-5.5/ext/standard/tests/math/
H A Dbug25694.phpt7 echo "round 0.045 = " . round(0.045, 2) . "\n";
9 echo "round 0.055 = " . round(0.055, 2) . "\n";
11 echo "round 5.045 = " . round(5.045, 2) . "\n";
13 echo "round 5.055 = " . round(5.055, 2) . "\n";
15 echo "round 3.025 = " . round(3.025, 2) . "\n";
17 echo "round 4.025 = " . round(4.025, 2) . "\n";
21 round 0.045 = 0.05
24 round 0.055 = 0.06
27 round 5.045 = 5.05
30 round 5.055 = 5.06
[all …]
H A Dround_modes.phpt2 round() with different rounding modes
5 var_dump (round (2.5, 0, PHP_ROUND_HALF_UP));
6 var_dump (round (2.5, 0, PHP_ROUND_HALF_DOWN));
7 var_dump (round (2.5, 0, PHP_ROUND_HALF_EVEN));
8 var_dump (round (2.5, 0, PHP_ROUND_HALF_ODD));
9 var_dump (round (-2.5, 0, PHP_ROUND_HALF_UP));
10 var_dump (round (-2.5, 0, PHP_ROUND_HALF_DOWN));
12 var_dump (round (-2.5, 0, PHP_ROUND_HALF_ODD));
13 var_dump (round (3.5, 0, PHP_ROUND_HALF_UP));
16 var_dump (round (3.5, 0, PHP_ROUND_HALF_ODD));
[all …]
H A Dbug24142.phpt2 Bug #24142 (round() problems)
7 echo "round({$v}, 2) -> ".round($v, 2)."\n";
12 round(0.005, 2) -> 0.01
13 round(0.015, 2) -> 0.02
14 round(0.025, 2) -> 0.03
15 round(0.035, 2) -> 0.04
16 round(0.045, 2) -> 0.05
17 round(0.055, 2) -> 0.06
18 round(0.065, 2) -> 0.07
19 round(0.075, 2) -> 0.08
[all …]
H A Dround_large_exp.phpt2 round() works correctly for large exponents
5 var_dump (2e-22 == round (2e-22, 22, PHP_ROUND_HALF_UP));
6 var_dump (1e-22 == round (1e-22, 22, PHP_ROUND_HALF_UP));
7 var_dump (2e-23 == round (2e-23, 23, PHP_ROUND_HALF_UP));
8 var_dump (1e-23 == round (1e-23, 23, PHP_ROUND_HALF_UP));
9 var_dump (2e-24 == round (2e-24, 24, PHP_ROUND_HALF_UP));
10 var_dump (1e-24 == round (1e-24, 24, PHP_ROUND_HALF_UP));
11 var_dump (2e22 == round (2e22, -22, PHP_ROUND_HALF_UP));
12 var_dump (1e22 == round (1e22, -22, PHP_ROUND_HALF_UP));
13 var_dump (2e23 == round (2e23, -23, PHP_ROUND_HALF_UP));
[all …]
H A Dround_error.phpt2 Test round() function : error conditions - incorrect number of args
5 /* Prototype : float round ( float $val [, int $precision ] )
12 * Pass incorrect number of arguments to round() to test behaviour
15 echo "*** Testing round() : error conditions ***\n";
18 var_dump(round());
19 var_dump(round(500, 10, true));
24 *** Testing round() : error conditions ***
28 Warning: round() expects at least 1 parameter, 0 given in %s on line %d
H A Dround.phpt18 LONG_MIN-1 ~== round(LONG_MIN - 0.6)
19 LONG_MIN ~== round(LONG_MIN - 0.4)
20 LONG_MIN ~== round(LONG_MIN + 0.4)
21 LONG_MIN+1 ~== round(LONG_MIN + 0.6)
26 LONG_MAX-1 ~== round(LONG_MAX - 0.6)
27 LONG_MAX ~== round(LONG_MAX - 0.4)
28 LONG_MAX ~== round(LONG_MAX + 0.4)
29 LONG_MAX+1 ~== round(LONG_MAX + 0.6)
H A Dround_variation2.phpt2 Test round() function : usage variations - different data types as $precision argument
7 /* Prototype : float round ( float $val [, int $precision ] )
13 echo "*** Testing round() : usage variations ***\n";
81 // loop through each element of $inputs to check the behaviour of round()
85 var_dump(round(123.4456789, $input));
92 *** Testing round() : usage variations ***
144 Warning: round() expects parameter 2 to be long, string given in %s on line %d
149 Warning: round() expects parameter 2 to be long, string given in %s on line %d
154 Warning: round() expects parameter 2 to be long, array given in %s on line %d
159 Warning: round() expects parameter 2 to be long, string given in %s on line %d
[all …]
H A Dround_basic.phpt2 Test round() - basic function test for round()
52 round: 123456789
66 round: 123.456789
80 round: -4.5679123
94 round: 12300
108 round: -4567
122 round: 2311527
136 round: 14680063
150 round: 1.234567
164 round: 2.3456789e8
[all …]
H A Dround_variation1.phpt2 Test round() function : usage variations - different data types as $val argument
7 /* Prototype : float round ( float $val [, int $precision ] )
13 echo "*** Testing round() : usage variations ***\n";
81 // loop through each element of $inputs to check the behaviour of round()
85 var_dump(round($input, 14));
92 *** Testing round() : usage variations ***
H A Dround_prerounding.phpt2 round() prerounds results to precision
7 var_dump (round (0.285, 2, PHP_ROUND_HALF_UP));
H A Dround_basiclong_64bit.phpt2 Test round function : 64bit long tests
24 var_dump(round($longVal));
/PHP-5.5/ext/hash/
H A Dhash_snefru.c26 #define round(L, C, N, SB) \ macro
72 round(B15, B00, B01, t0); in Snefru()
73 round(B00, B01, B02, t0); in Snefru()
74 round(B01, B02, B03, t1); in Snefru()
75 round(B02, B03, B04, t1); in Snefru()
76 round(B03, B04, B05, t0); in Snefru()
77 round(B04, B05, B06, t0); in Snefru()
78 round(B05, B06, B07, t1); in Snefru()
79 round(B06, B07, B08, t1); in Snefru()
80 round(B07, B08, B09, t0); in Snefru()
[all …]
H A Dhash_gost.c30 #define round(k1, k2) \ macro
41 round(key[0], key[1]) \
42 round(key[2], key[3]) \
43 round(key[4], key[5]) \
44 round(key[6], key[7]) \
45 round(key[0], key[1]) \
46 round(key[2], key[3]) \
47 round(key[4], key[5]) \
48 round(key[6], key[7]) \
49 round(key[0], key[1]) \
[all …]
H A Dhash_tiger.c42 #define round(a,b,c,x,mul) \ macro
55 round(a,b,c,x0,mul) \
56 round(b,c,a,x1,mul) \
57 round(c,a,b,x2,mul) \
58 round(a,b,c,x3,mul) \
59 round(b,c,a,x4,mul) \
60 round(c,a,b,x5,mul) \
61 round(a,b,c,x6,mul) \
62 round(b,c,a,x7,mul)
/PHP-5.5/ext/standard/
H A Dcrypt_freesec.c382 int shifts, round; in des_setkey() local
432 for (round = 0; round < 16; round++) { in des_setkey()
435 shifts += key_shifts[round]; in des_setkey()
440 data->de_keysl[15 - round] = in des_setkey()
441 data->en_keysl[round] = comp_maskl[0][(t0 >> 21) & 0x7f] in des_setkey()
450 data->de_keysr[15 - round] = in des_setkey()
451 data->en_keysr[round] = comp_maskr[0][(t0 >> 21) & 0x7f] in des_setkey()
472 int round; in do_des() local
518 round = 16; in do_des()
519 while (round--) { in do_des()
/PHP-5.5/ext/standard/tests/strings/
H A Dord_basic.phpt25 // Make sure all valid ascii chars round trip
28 exit("TEST FAILED: $i does not round trip\n");
H A Dstr_rot13_basic.phpt29 echo "\nEnsure strings round trip\n";
53 Ensure strings round trip
/PHP-5.5/ext/standard/tests/misc/
H A Dtime_sleep_until_basic.phpt22 // fix: round to nearest millisecond
26 $now = round($now, 3);
/PHP-5.5/ext/phar/tests/tar/
H A Dtar_003.phpt42 echo "second round\n";
64 second round
/PHP-5.5/ext/mysqli/tests/
H A Dmysqli_stmt_bind_result_format.phpt165 $expected[$k] = number_format(round($v), 0, '.', ',');
170 $expected[$k] = number_format(round($v), 0, '.', ',');
175 $expected[$k] = number_format(round($v), 0, '.', ',');
180 $expected[$k] = number_format(round($v), 0, '.', ',');
185 $expected[$k] = number_format(round($v), 0, '.', ',');
190 $expected[$k] = number_format(round($v), 0, '.', ',');
195 $expected[$k] = number_format(round($v), 0, '.', ',');
200 $expected[$k] = number_format(round($v), 0, '.', ',');
H A Dbug42378.phpt163 $expected[$k] = number_format(round($v), 0, '.', ',');
168 $expected[$k] = number_format(round($v), 0, '.', ',');
173 $expected[$k] = number_format(round($v), 0, '.', ',');
178 $expected[$k] = number_format(round($v), 0, '.', ',');
/PHP-5.5/ext/soap/interop/
H A Dtest.utility.php47 $f1 = round($f1, $d);
48 $f2 = round($f2, $d);
/PHP-5.5/ext/gmp/
H A Dgmp.c73 ZEND_ARG_INFO(0, round)
79 ZEND_ARG_INFO(0, round)
85 ZEND_ARG_INFO(0, round)
857 long round = GMP_ROUND_ZERO; local
859 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ|l", &a_arg, &b_arg, &round) == FAILURE) {
863 switch (round) {
883 long round = GMP_ROUND_ZERO; local
885 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ|l", &a_arg, &b_arg, &round) == FAILURE) {
889 switch (round) {
908 long round = GMP_ROUND_ZERO; local
[all …]
/PHP-5.5/ext/standard/tests/streams/
H A Dbug61371-win.phpt19 echo 'memory: '.round($current / 1024, 0)."kb\n";
H A Dbug61371.phpt19 echo 'memory: '.round($current / 1024, 0)."kb\n";

Completed in 86 milliseconds

12