Lines Matching refs:assertEquals

31     public static void assertEquals(short expected, short calculated) {  in assertEquals()  method in Main
36 public static void assertEquals(float expected, float calculated) { in assertEquals() method in Main
60 assertEquals(h, FP16.toHalf(FP16.toFloat(h))); in testHalfToFloatToHalfConversions()
68 assertEquals(FP16.POSITIVE_ZERO, FP16.toHalf(0.0f)); in testToHalf()
69 assertEquals(FP16.NEGATIVE_ZERO, FP16.toHalf(-0.0f)); in testToHalf()
70 assertEquals(FP16.NaN, FP16.toHalf(Float.NaN)); in testToHalf()
71 assertEquals(FP16.POSITIVE_INFINITY, FP16.toHalf(Float.POSITIVE_INFINITY)); in testToHalf()
72 assertEquals(FP16.NEGATIVE_INFINITY, FP16.toHalf(Float.NEGATIVE_INFINITY)); in testToHalf()
74 assertEquals((short) 0x3c01, FP16.toHalf(1.0009765625f)); in testToHalf()
75 assertEquals((short) 0xc000, FP16.toHalf(-2.0f)); in testToHalf()
76 assertEquals((short) 0x0400, FP16.toHalf(6.10352e-5f)); in testToHalf()
77 assertEquals((short) 0x7bff, FP16.toHalf(65504.0f)); in testToHalf()
78 assertEquals((short) 0x3555, FP16.toHalf(1.0f / 3.0f)); in testToHalf()
80 assertEquals((short) 0x03ff, FP16.toHalf(6.09756e-5f)); in testToHalf()
81 assertEquals(FP16.MIN_VALUE, FP16.toHalf(5.96046e-8f)); in testToHalf()
82 assertEquals((short) 0x83ff, FP16.toHalf(-6.09756e-5f)); in testToHalf()
83 assertEquals((short) 0x8001, FP16.toHalf(-5.96046e-8f)); in testToHalf()
85 assertEquals(FP16.POSITIVE_ZERO, FP16.toHalf(5.96046e-9f)); in testToHalf()
86 assertEquals(FP16.NEGATIVE_ZERO, FP16.toHalf(-5.96046e-9f)); in testToHalf()
88 assertEquals(0x1000, FP16.toHalf(Float.intBitsToFloat(0x39fff000))); in testToHalf()
89 assertEquals(0x0400, FP16.toHalf(Float.intBitsToFloat(0x387fe000))); in testToHalf()
92 assertEquals(0x7bff, FP16.toHalf(65519.0f)); in testToHalf()
93 assertEquals(0x7bff, FP16.toHalf(65519.9f)); in testToHalf()
94 assertEquals(FP16.POSITIVE_INFINITY, FP16.toHalf(65520.0f)); in testToHalf()
95 assertEquals(FP16.NEGATIVE_INFINITY, FP16.toHalf(-65520.0f)); in testToHalf()
98 assertEquals(0x6800, FP16.toHalf(2049.0f)); in testToHalf()
99 assertEquals(0x6c00, FP16.toHalf(4098.0f)); in testToHalf()
100 assertEquals(0x7000, FP16.toHalf(8196.0f)); in testToHalf()
101 assertEquals(0x7400, FP16.toHalf(16392.0f)); in testToHalf()
102 assertEquals(0x7800, FP16.toHalf(32784.0f)); in testToHalf()
120 assertEquals(0xffc02000, TestFP16ToFloatRawIntBits((short)(0xfc01))); // SNaN->QNaN in testToFloat()
121 assertEquals(0xffffe000, TestFP16ToFloatRawIntBits((short)(0xfdff))); // SNaN->QNaN in testToFloat()
122 assertEquals(0xffc00000, TestFP16ToFloatRawIntBits((short)(0xfe00))); // QNaN->QNaN in testToFloat()
123 assertEquals(0xffffe000, TestFP16ToFloatRawIntBits((short)(0xffff))); // QNaN->QNaN in testToFloat()
128 assertEquals(FP16.POSITIVE_INFINITY, FP16.floor(FP16.POSITIVE_INFINITY)); in testFloor()
129 assertEquals(FP16.NEGATIVE_INFINITY, FP16.floor(FP16.NEGATIVE_INFINITY)); in testFloor()
130 assertEquals(FP16.POSITIVE_ZERO, FP16.floor(FP16.POSITIVE_ZERO)); in testFloor()
131 assertEquals(FP16.NEGATIVE_ZERO, FP16.floor(FP16.NEGATIVE_ZERO)); in testFloor()
132 assertEquals(FP16.NaN, FP16.floor(FP16.NaN)); in testFloor()
133 assertEquals(FP16.LOWEST_VALUE, FP16.floor(FP16.LOWEST_VALUE)); in testFloor()
134 assertEquals(FP16.POSITIVE_ZERO, FP16.floor(FP16.MIN_NORMAL)); in testFloor()
135 assertEquals(FP16.POSITIVE_ZERO, FP16.floor((short) 0x3ff)); in testFloor()
136 assertEquals(FP16.POSITIVE_ZERO, FP16.floor(FP16.toHalf(0.2f))); in testFloor()
137 assertEquals(-1.0f, FP16.toFloat(FP16.floor(FP16.toHalf(-0.2f)))); in testFloor()
138 assertEquals(-1.0f, FP16.toFloat(FP16.floor(FP16.toHalf(-0.7f)))); in testFloor()
139 assertEquals(FP16.POSITIVE_ZERO, FP16.floor(FP16.toHalf(0.7f))); in testFloor()
140 assertEquals(124.0f, FP16.toFloat(FP16.floor(FP16.toHalf(124.7f)))); in testFloor()
141 assertEquals(-125.0f, FP16.toFloat(FP16.floor(FP16.toHalf(-124.7f)))); in testFloor()
142 assertEquals(124.0f, FP16.toFloat(FP16.floor(FP16.toHalf(124.2f)))); in testFloor()
143 assertEquals(-125.0f, FP16.toFloat(FP16.floor(FP16.toHalf(-124.2f)))); in testFloor()
145 assertEquals((short) 0x7e01, FP16.floor((short) 0x7c01)); in testFloor()
146 assertEquals((short) 0x7f00, FP16.floor((short) 0x7d00)); in testFloor()
147 assertEquals((short) 0xfe01, FP16.floor((short) 0xfc01)); in testFloor()
148 assertEquals((short) 0xff00, FP16.floor((short) 0xfd00)); in testFloor()
153 assertEquals(FP16.POSITIVE_INFINITY, FP16.ceil(FP16.POSITIVE_INFINITY)); in testCeil()
154 assertEquals(FP16.NEGATIVE_INFINITY, FP16.ceil(FP16.NEGATIVE_INFINITY)); in testCeil()
155 assertEquals(FP16.POSITIVE_ZERO, FP16.ceil(FP16.POSITIVE_ZERO)); in testCeil()
156 assertEquals(FP16.NEGATIVE_ZERO, FP16.ceil(FP16.NEGATIVE_ZERO)); in testCeil()
157 assertEquals(FP16.NaN, FP16.ceil(FP16.NaN)); in testCeil()
158 assertEquals(FP16.LOWEST_VALUE, FP16.ceil(FP16.LOWEST_VALUE)); in testCeil()
159 assertEquals(1.0f, FP16.toFloat(FP16.ceil(FP16.MIN_NORMAL))); in testCeil()
160 assertEquals(1.0f, FP16.toFloat(FP16.ceil((short) 0x3ff))); in testCeil()
161 assertEquals(1.0f, FP16.toFloat(FP16.ceil(FP16.toHalf(0.2f)))); in testCeil()
162 assertEquals(FP16.NEGATIVE_ZERO, FP16.ceil(FP16.toHalf(-0.2f))); in testCeil()
163 assertEquals(1.0f, FP16.toFloat(FP16.ceil(FP16.toHalf(0.7f)))); in testCeil()
164 assertEquals(FP16.NEGATIVE_ZERO, FP16.ceil(FP16.toHalf(-0.7f))); in testCeil()
165 assertEquals(125.0f, FP16.toFloat(FP16.ceil(FP16.toHalf(124.7f)))); in testCeil()
166 assertEquals(-124.0f, FP16.toFloat(FP16.ceil(FP16.toHalf(-124.7f)))); in testCeil()
167 assertEquals(125.0f, FP16.toFloat(FP16.ceil(FP16.toHalf(124.2f)))); in testCeil()
168 assertEquals(-124.0f, FP16.toFloat(FP16.ceil(FP16.toHalf(-124.2f)))); in testCeil()
170 assertEquals((short) 0x7e01, FP16.floor((short) 0x7c01)); in testCeil()
171 assertEquals((short) 0x7f00, FP16.floor((short) 0x7d00)); in testCeil()
172 assertEquals((short) 0xfe01, FP16.floor((short) 0xfc01)); in testCeil()
173 assertEquals((short) 0xff00, FP16.floor((short) 0xfd00)); in testCeil()
177 assertEquals(FP16.POSITIVE_INFINITY, FP16.rint(FP16.POSITIVE_INFINITY)); in testRint()
178 assertEquals(FP16.NEGATIVE_INFINITY, FP16.rint(FP16.NEGATIVE_INFINITY)); in testRint()
179 assertEquals(FP16.POSITIVE_ZERO, FP16.rint(FP16.POSITIVE_ZERO)); in testRint()
180 assertEquals(FP16.NEGATIVE_ZERO, FP16.rint(FP16.NEGATIVE_ZERO)); in testRint()
181 assertEquals(FP16.NaN, FP16.rint(FP16.NaN)); in testRint()
182 assertEquals(FP16.LOWEST_VALUE, FP16.rint(FP16.LOWEST_VALUE)); in testRint()
183 assertEquals(FP16.POSITIVE_ZERO, FP16.rint(FP16.MIN_VALUE)); in testRint()
184 assertEquals(FP16.POSITIVE_ZERO, FP16.rint((short) 0x200)); in testRint()
185 assertEquals(FP16.POSITIVE_ZERO, FP16.rint((short) 0x3ff)); in testRint()
186 assertEquals(FP16.POSITIVE_ZERO, FP16.rint(FP16.toHalf(0.2f))); in testRint()
187 assertEquals(FP16.NEGATIVE_ZERO, FP16.rint(FP16.toHalf(-0.2f))); in testRint()
188 assertEquals(1.0f, FP16.toFloat(FP16.rint(FP16.toHalf(0.7f)))); in testRint()
189 assertEquals(-1.0f, FP16.toFloat(FP16.rint(FP16.toHalf(-0.7f)))); in testRint()
190 assertEquals(0.0f, FP16.toFloat(FP16.rint(FP16.toHalf(0.5f)))); in testRint()
191 assertEquals(-0.0f, FP16.toFloat(FP16.rint(FP16.toHalf(-0.5f)))); in testRint()
192 assertEquals(125.0f, FP16.toFloat(FP16.rint(FP16.toHalf(124.7f)))); in testRint()
193 assertEquals(-125.0f, FP16.toFloat(FP16.rint(FP16.toHalf(-124.7f)))); in testRint()
194 assertEquals(124.0f, FP16.toFloat(FP16.rint(FP16.toHalf(124.2f)))); in testRint()
195 assertEquals(-124.0f, FP16.toFloat(FP16.rint(FP16.toHalf(-124.2f)))); in testRint()
197 assertEquals((short) 0x7e01, FP16.floor((short) 0x7c01)); in testRint()
198 assertEquals((short) 0x7f00, FP16.floor((short) 0x7d00)); in testRint()
199 assertEquals((short) 0xfe01, FP16.floor((short) 0xfc01)); in testRint()
200 assertEquals((short) 0xff00, FP16.floor((short) 0xfd00)); in testRint()