fix name of rounding method
authorBill Zorn <bill.zorn@gmail.com>
Mon, 6 Aug 2018 23:39:16 +0000 (16:39 -0700)
committerBill Zorn <bill.zorn@gmail.com>
Mon, 6 Aug 2018 23:39:16 +0000 (16:39 -0700)
sfpy/posit.pyx

index 4fb76aa49dca69277add476ce43cff3c62db4535..7816613828dba45ba174aa535ba6ac4a4b7ce6aa 100644 (file)
@@ -73,7 +73,7 @@ cdef class Posit8:
         return Posit8.from_c_posit(f)
 
     def __round__(self):
         return Posit8.from_c_posit(f)
 
     def __round__(self):
-        return self.roundToInt()
+        return self.round()
 
     cpdef Posit8 add(self, Posit8 other):
         cdef cposit.posit8_t f = cposit.p8_add(self._c_posit, other._c_posit)
 
     cpdef Posit8 add(self, Posit8 other):
         cdef cposit.posit8_t f = cposit.p8_add(self._c_posit, other._c_posit)
@@ -407,7 +407,7 @@ cdef class Posit16:
         return Posit16.from_c_posit(f)
 
     def __round__(self):
         return Posit16.from_c_posit(f)
 
     def __round__(self):
-        return self.roundToInt()
+        return self.round()
 
     cpdef Posit16 add(self, Posit16 other):
         cdef cposit.posit16_t f = cposit.p16_add(self._c_posit, other._c_posit)
 
     cpdef Posit16 add(self, Posit16 other):
         cdef cposit.posit16_t f = cposit.p16_add(self._c_posit, other._c_posit)