bint isNaRQ8( quire8_t );
bint isQ8Zero( quire8_t );
- quire8_t q8_clr( quire8_t );
+ #quire8_t q8_clr( quire8_t );
+ quire8_t q8Clr();
quire8_t castQ8( uint32_t );
posit8_t castP8( uint8_t );
uint8_t castUI8( posit8_t );
# void printBinary( uint64_t*, int );
# void printHex( uint64_t );
- quire16_t q16_clr( quire16_t );
+ #quire16_t q16_clr( quire16_t );
+ quire16_t q16Clr();
quire16_t castQ16( uint16_t, uint16_t );
posit16_t castP16( uint16_t );
uint16_t castUI16( posit16_t );
bint isNaRQ32( quire32_t );
bint isQ32Zero( quire32_t );
quire32_t q32_TwosComplement( quire32_t );
- quire32_t q32_clr( quire32_t );
+ #quire32_t q32_clr( quire32_t );
quire32_t q32Clr();
quire32_t castQ32( uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t );
posit32_t castP32( uint32_t );
cpdef to_quire(self):
cdef cposit.quire8_t f
- f = cposit.q8_clr(f)
+ f = cposit.q8Clr()
f = cposit.q8_fdp_add(f, self._c_posit, _p8_one)
return Quire8.from_c_quire(f)
self._c_quire.v = value
else:
f = float(value)
- self._c_quire = cposit.q8_clr(self._c_quire)
+ self._c_quire = cposit.q8Clr()
self._c_quire = cposit.q8_fdp_add(self._c_quire, cposit.convertDoubleToP8(f), _p8_one)
def __float__(self):
self._c_quire = cposit.q8_fdp_sub(self._c_quire, a1._c_posit, a2._c_posit)
cpdef void iclr(self):
- self._c_quire = cposit.q8_clr(self._c_quire)
+ self._c_quire = cposit.q8Clr()
# conversion back to posit
cpdef Quire8 p8_to_q8(Posit8 a1):
cdef cposit.quire8_t f
- f = cposit.q8_clr(f)
+ f = cposit.q8Clr()
f = cposit.q8_fdp_add(f, a1._c_posit, _p8_one)
return Quire8.from_c_quire(f)
cpdef to_quire(self):
cdef cposit.quire16_t f
- f = cposit.q16_clr(f)
+ f = cposit.q16Clr()
f = cposit.q16_fdp_add(f, self._c_posit, _p16_one)
return Quire16.from_c_quire(f)
raise OverflowError('value too large to fit in uint64_t[2]')
else:
f = float(value)
- self._c_quire = cposit.q16_clr(self._c_quire)
+ self._c_quire = cposit.q16Clr()
self._c_quire = cposit.q16_fdp_add(self._c_quire, cposit.convertDoubleToP16(f), _p16_one)
def __float__(self):
self._c_quire = cposit.q16_fdp_sub(self._c_quire, a1._c_posit, a2._c_posit)
cpdef void iclr(self):
- self._c_quire = cposit.q16_clr(self._c_quire)
+ self._c_quire = cposit.q16Clr()
# conversion back to posit
cpdef Quire16 p16_to_q16(Posit16 a1):
cdef cposit.quire16_t f
- f = cposit.q16_clr(f)
+ f = cposit.q16Clr()
f = cposit.q16_fdp_add(f, a1._c_posit, _p16_one)
return Quire16.from_c_quire(f)
cpdef to_quire(self):
cdef cposit.quire32_t f
- f = cposit.q32_clr(f)
+ f = cposit.q32Clr()
f = cposit.q32_fdp_add(f, self._c_posit, _p32_one)
return Quire32.from_c_quire(f)
raise OverflowError('value too large to fit in uint64_t[8]')
else:
f = float(value)
- self._c_quire = cposit.q32_clr(self._c_quire)
+ self._c_quire = cposit.q32Clr()
self._c_quire = cposit.q32_fdp_add(self._c_quire, cposit.convertDoubleToP32(f), _p32_one)
def __float__(self):
self._c_quire = cposit.q32_fdp_sub(self._c_quire, a1._c_posit, a2._c_posit)
cpdef void iclr(self):
- self._c_quire = cposit.q32_clr(self._c_quire)
+ self._c_quire = cposit.q32Clr()
# conversion back to posit
cpdef Quire32 p32_to_q32(Posit32 a1):
cdef cposit.quire32_t f
- f = cposit.q32_clr(f)
+ f = cposit.q32Clr()
f = cposit.q32_fdp_add(f, a1._c_posit, _p32_one)
return Quire32.from_c_quire(f)