Home
last modified time | relevance | path

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

123

/php-src/ext/standard/tests/math/
H A Dbug24142.phpt2 Bug #24142 (round() problems)
5 echo "round(0.005, 2)\n";
41 round(0.005, 2)
44 round(0.015, 2)
47 round(0.025, 2)
50 round(0.035, 2)
53 round(0.045, 2)
56 round(0.055, 2)
59 round(0.065, 2)
62 round(0.075, 2)
[all …]
H A Dround_gh12143_optimize_round.phpt2 Fix GH-12143: Optimize round
6 var_dump(round(1.700000000000145, 13, PHP_ROUND_HALF_UP));
7 var_dump(round(-1.700000000000145, 13, PHP_ROUND_HALF_UP));
8 var_dump(round(123456789012344.5, -1, PHP_ROUND_HALF_UP));
9 var_dump(round(-123456789012344.5, -1, PHP_ROUND_HALF_UP));
13 var_dump(round(1.70000000000015, 13, PHP_ROUND_HALF_DOWN));
14 var_dump(round(-1.70000000000015, 13, PHP_ROUND_HALF_DOWN));
15 var_dump(round(123456789012345.0, -1, PHP_ROUND_HALF_DOWN));
17 var_dump(round(1.500000000000001, 0, PHP_ROUND_HALF_DOWN));
22 var_dump(round(1.70000000000025, 13, PHP_ROUND_HALF_EVEN));
[all …]
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_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_variation1.phpt2 Test round() function : usage variations - different data types as $val argument
7 echo "*** Testing round() : usage variations ***\n";
80 var_dump(round($input, 14));
89 *** Testing round() : usage variations ***
144 round(): Argument #1 ($num) must be of type int|float, string given
147 round(): Argument #1 ($num) must be of type int|float, string given
150 round(): Argument #1 ($num) must be of type int|float, array given
153 round(): Argument #1 ($num) must be of type int|float, string given
156 round(): Argument #1 ($num) must be of type int|float, string given
159 round(): Argument #1 ($num) must be of type int|float, string given
[all …]
H A Dround.phpt21 var_dump(epsilon_equal( LONG_MIN-1 , round(LONG_MIN - 0.6) ));
22 var_dump(epsilon_equal( LONG_MIN , round(LONG_MIN - 0.4) ));
23 var_dump(epsilon_equal( LONG_MIN , round(LONG_MIN + 0.4) ));
24 var_dump(epsilon_equal( LONG_MIN+1 , round(LONG_MIN + 0.6) ));
29 var_dump(epsilon_equal( LONG_MAX-1 , round(LONG_MAX - 0.6) ));
30 var_dump(epsilon_equal( LONG_MAX , round(LONG_MAX - 0.4) ));
31 var_dump(epsilon_equal( LONG_MAX , round(LONG_MAX + 0.4) ));
32 var_dump(epsilon_equal( LONG_MAX+1 , round(LONG_MAX + 0.6) ));
H A Dround_valid_rounding_mode.phpt2 round() rejects invalid rounding modes.
6 var_dump(round(1.5, mode: 1234));
12 round(): Argument #3 ($mode) must be a valid rounding mode (RoundingMode::*)
H A Dround_modes_zeros.phpt2 round() with different rounding modes for zeros
22 echo "\t\t 0 => " . round(0, $precision, $mode) . "\n";
23 echo "\t\t -0 => " . round(-0, $precision, $mode) . "\n";
24 echo "\t\t 0.0 => " . round(0.0, $precision, $mode) . "\n";
25 echo "\t\t -0.0 => " . round(-0.0, $precision, $mode) . "\n";
H A Dround_basic.phpt2 Test round() - basic function test for round()
32 echo "round: $values[$i]\n";
42 round: 123456789
58 round: 123.456789
74 round: -4.5679123
90 round: 12300
106 round: -4567
122 round: 2311527
138 round: 14680063
154 round: 1.234567
[all …]
H A Dround_bug71201.phpt2 Bug #71201 round() segfault on 64-bit builds
5 echo round(1.0, -2147483648), "\n";
H A Dround_prerounding.phpt2 round() prerounds results to precision
7 var_dump (round (0.285, 2, PHP_ROUND_HALF_UP));
H A Dround_modes_ceiling_and_floor.phpt2 round() with modes PositiveInfinity and NegativeInfinity
25 var_dump(ceil($number) === round($number, 0, RoundingMode::PositiveInfinity));
31 var_dump(floor($number) === round($number, 0, RoundingMode::NegativeInfinity));
H A Dround_basiclong_64bit.phpt2 Test round function : 64bit long tests
24 var_dump(round($longVal));
H A Dround_RoundingMode.phpt2 round(): Test RoundingMode enum.
18 printf("%-20s: %+.17g -> %+.17g\n", $mode->name, $number, round($number, 0, $mode));
H A Dround_gh12143_expand_rounding_target.phpt2 Feature GH-12143: Extend the maximum precision round can handle by one digit
78 var_dump(round($val, $precision, constant($mode)));
H A Dround_modes.phpt2 round() with different rounding modes
43 $result = round($number, $precision, $mode);
H A Dround_gh12143_1.phpt15 printf("%-20s: %+.17g -> %+.17g\n", $mode, $number, round($number, 0, constant($mode)));
/php-src/ext/hash/
H A Dhash_snefru.c22 #define round(L, C, N, SB) \ macro
68 round(B15, B00, B01, t0); in Snefru()
69 round(B00, B01, B02, t0); in Snefru()
70 round(B01, B02, B03, t1); in Snefru()
71 round(B02, B03, B04, t1); in Snefru()
72 round(B03, B04, B05, t0); in Snefru()
73 round(B04, B05, B06, t0); in Snefru()
74 round(B05, B06, B07, t1); in Snefru()
75 round(B06, B07, B08, t1); in Snefru()
76 round(B07, B08, B09, t0); in Snefru()
[all …]
H A Dhash_gost.c26 #define round(tables, k1, k2) \ macro
37 round(tables, key[0], key[1]) \
38 round(tables, key[2], key[3]) \
39 round(tables, key[4], key[5]) \
40 round(tables, key[6], key[7]) \
41 round(tables, key[0], key[1]) \
42 round(tables, key[2], key[3]) \
43 round(tables, key[4], key[5]) \
44 round(tables, key[6], key[7]) \
45 round(tables, key[0], key[1]) \
[all …]
H A Dhash_tiger.c38 #define round(a,b,c,x,mul) \ macro
51 round(a,b,c,x0,mul) \
52 round(b,c,a,x1,mul) \
53 round(c,a,b,x2,mul) \
54 round(a,b,c,x3,mul) \
55 round(b,c,a,x4,mul) \
56 round(c,a,b,x5,mul) \
57 round(a,b,c,x6,mul) \
58 round(b,c,a,x7,mul)
/php-src/ext/bcmath/tests/number/methods/
H A Dround.phpt2 BcMath\Number round()
23 $method_ret = (new BcMath\Number($number))->round(0, $mode);
37 $method_ret = (new BcMath\Number($number))->round(5, $mode);
/php-src/ext/standard/
H A Dcrypt_freesec.c374 int shifts, round; in des_setkey() local
424 for (round = 0; round < 16; round++) { in des_setkey()
427 shifts += key_shifts[round]; in des_setkey()
432 data->de_keysl[15 - round] = in des_setkey()
433 data->en_keysl[round] = comp_maskl[0][(t0 >> 21) & 0x7f] in des_setkey()
442 data->de_keysr[15 - round] = in des_setkey()
443 data->en_keysr[round] = comp_maskr[0][(t0 >> 21) & 0x7f] in des_setkey()
464 int round; in do_des() local
510 round = 16; in do_des()
511 while (round--) { in do_des()
/php-src/ext/standard/tests/strings/
H A Dord_basic.phpt20 // Make sure all valid ascii chars round trip
23 exit("TEST FAILED: $i does not round trip\n");
H A Dstr_rot13_basic.phpt25 echo "\nEnsure strings round trip\n";
48 Ensure strings round trip
/php-src/ext/phar/tests/tar/
H A Dtar_003.phpt41 echo "second round\n";
62 second round

Completed in 39 milliseconds

123