1--TEST-- 2bcround() function TowardsZero 3--EXTENSIONS-- 4bcmath 5--FILE-- 6<?php 7require_once __DIR__ . '/bcround_test_helper.inc'; 8run_round_test(RoundingMode::TowardsZero); 9?> 10--EXPECT-- 11========== non-boundary value ========== 12 [1.1, 0] => 1 13 [1.2, 0] => 1 14 [1.3, 0] => 1 15 [1.4, 0] => 1 16 [1.6, 0] => 1 17 [1.7, 0] => 1 18 [1.8, 0] => 1 19 [1.9, 0] => 1 20 [-1.1, 0] => -1 21 [-1.2, 0] => -1 22 [-1.3, 0] => -1 23 [-1.4, 0] => -1 24 [-1.6, 0] => -1 25 [-1.7, 0] => -1 26 [-1.8, 0] => -1 27 [-1.9, 0] => -1 28 29========== minus precision ========== 30 [50, -2] => 0 31 [-50, -2] => 0 32 [1230, -1] => 1230 33 [1235, -1] => 1230 34 [-1230, -1] => -1230 35 [-1235, -1] => -1230 36 [3400.0000, -2] => 3400 37 [3400.0001, -2] => 3400 38 [3450.0000, -2] => 3400 39 [3450.0001, -2] => 3400 40 [-3400.0000, -2] => -3400 41 [-3400.0001, -2] => -3400 42 [-3450.0000, -2] => -3400 43 [-3450.0001, -2] => -3400 44 45========== zero precision ========== 46 [1235, 0] => 1235 47 [1235.0, 0] => 1235 48 [1235.000001, 0] => 1235 49 [1235.5, 0] => 1235 50 [1235.500001, 0] => 1235 51 [-1235, 0] => -1235 52 [-1235.0, 0] => -1235 53[-1235.000001, 0] => -1235 54 [-1235.5, 0] => -1235 55[-1235.500001, 0] => -1235 56 [0.0001, 0] => 0 57 [0.5, 0] => 0 58 [0.5000, 0] => 0 59 [0.5001, 0] => 0 60 [-0.0001, 0] => 0 61 [-0.5, 0] => 0 62 [-0.5000, 0] => 0 63 [-0.5001, 0] => 0 64 65========== plus precision ========== 66 [28.40, 1] => 28.4 67 [28.4000001, 1] => 28.4 68 [28.45, 1] => 28.4 69 [28.4500001, 1] => 28.4 70 [-28.40, 1] => -28.4 71 [-28.4000001, 1] => -28.4 72 [-28.45, 1] => -28.4 73 [-28.4500001, 1] => -28.4 74 [153.90, 1] => 153.9 75 [153.9000001, 1] => 153.9 76 [153.95, 1] => 153.9 77 [153.9500001, 1] => 153.9 78 [-153.90, 1] => -153.9 79[-153.9000001, 1] => -153.9 80 [-153.95, 1] => -153.9 81[-153.9500001, 1] => -153.9 82 [0.000001, 3] => 0.000 83 [0.0005, 3] => 0.000 84 [0.000500, 3] => 0.000 85 [0.000501, 3] => 0.000 86 [-0.000001, 3] => 0.000 87 [-0.0005, 3] => 0.000 88 [-0.000500, 3] => 0.000 89 [-0.000501, 3] => 0.000 90