Lines Matching refs:round2
12 round2, round3, isclose, redirect_stdout, redirect_stderr)
83 self.assertRaises(TypeError, round2, 3.14159, 2.0)
90 self.assertAlmostEqual(round2(0.125, 2), 0.13)
91 self.assertAlmostEqual(round2(0.375, 2), 0.38)
92 self.assertAlmostEqual(round2(0.625, 2), 0.63)
93 self.assertAlmostEqual(round2(0.875, 2), 0.88)
94 self.assertAlmostEqual(round2(-0.125, 2), -0.13)
95 self.assertAlmostEqual(round2(-0.375, 2), -0.38)
96 self.assertAlmostEqual(round2(-0.625, 2), -0.63)
97 self.assertAlmostEqual(round2(-0.875, 2), -0.88)
99 self.assertAlmostEqual(round2(0.25, 1), 0.3)
100 self.assertAlmostEqual(round2(0.75, 1), 0.8)
101 self.assertAlmostEqual(round2(-0.25, 1), -0.3)
102 self.assertAlmostEqual(round2(-0.75, 1), -0.8)
104 self.assertEqual(round2(-6.5, 0), -7.0)
105 self.assertEqual(round2(-5.5, 0), -6.0)
106 self.assertEqual(round2(-1.5, 0), -2.0)
107 self.assertEqual(round2(-0.5, 0), -1.0)
108 self.assertEqual(round2(0.5, 0), 1.0)
109 self.assertEqual(round2(1.5, 0), 2.0)
110 self.assertEqual(round2(2.5, 0), 3.0)
111 self.assertEqual(round2(3.5, 0), 4.0)
112 self.assertEqual(round2(4.5, 0), 5.0)
113 self.assertEqual(round2(5.5, 0), 6.0)
114 self.assertEqual(round2(6.5, 0), 7.0)
118 self.assertEqual(round2(-6.5), -7.0)
119 self.assertEqual(round2(-5.5), -6.0)
120 self.assertEqual(round2(-1.5), -2.0)
121 self.assertEqual(round2(-0.5), -1.0)
122 self.assertEqual(round2(0.5), 1.0)
123 self.assertEqual(round2(1.5), 2.0)
124 self.assertEqual(round2(2.5), 3.0)
125 self.assertEqual(round2(3.5), 4.0)
126 self.assertEqual(round2(4.5), 5.0)
127 self.assertEqual(round2(5.5), 6.0)
128 self.assertEqual(round2(6.5), 7.0)
130 self.assertEqual(round2(-25.0, -1), -30.0)
131 self.assertEqual(round2(-15.0, -1), -20.0)
132 self.assertEqual(round2(-5.0, -1), -10.0)
133 self.assertEqual(round2(5.0, -1), 10.0)
134 self.assertEqual(round2(15.0, -1), 20.0)
135 self.assertEqual(round2(25.0, -1), 30.0)
136 self.assertEqual(round2(35.0, -1), 40.0)
137 self.assertEqual(round2(45.0, -1), 50.0)
138 self.assertEqual(round2(55.0, -1), 60.0)
139 self.assertEqual(round2(65.0, -1), 70.0)
140 self.assertEqual(round2(75.0, -1), 80.0)
141 self.assertEqual(round2(85.0, -1), 90.0)
142 self.assertEqual(round2(95.0, -1), 100.0)
143 self.assertEqual(round2(12325.0, -1), 12330.0)
144 self.assertEqual(round2(0, -1), 0.0)
146 self.assertEqual(round2(350.0, -2), 400.0)
147 self.assertEqual(round2(450.0, -2), 500.0)
149 self.assertAlmostEqual(round2(0.5e21, -21), 1e21)
150 self.assertAlmostEqual(round2(1.5e21, -21), 2e21)
151 self.assertAlmostEqual(round2(2.5e21, -21), 3e21)
152 self.assertAlmostEqual(round2(5.5e21, -21), 6e21)
153 self.assertAlmostEqual(round2(8.5e21, -21), 9e21)
155 self.assertAlmostEqual(round2(-1.5e22, -22), -2e22)
156 self.assertAlmostEqual(round2(-0.5e22, -22), -1e22)
157 self.assertAlmostEqual(round2(0.5e22, -22), 1e22)
158 self.assertAlmostEqual(round2(1.5e22, -22), 2e22)