def testHalf(self): testFpo = float.fpo("0 00 1") self.assertEqual(testFpo.calculate_decimal(), 0.5)
def test14(self): testFpo = float.fpo("0 1010 1100") self.assertEqual(testFpo.calculate_decimal(), 14)
def testPosInf(self): testFpo = float.fpo("0 1111 0000") self.assertEqual(testFpo.calculate_decimal(), "inf")
def testNegInf(self): testFpo = float.fpo("1 1111 0000") self.assertEqual(testFpo.calculate_decimal(), "-inf")
def testNaN(self): testFpo = float.fpo("0 1111 1111") self.assertEqual(testFpo.calculate_decimal(), "NaN")