From a5f0ec87770343fcf8a33f9c7a44cad8befe9afb Mon Sep 17 00:00:00 2001 From: Bill Zorn Date: Wed, 8 Aug 2018 01:02:36 -0700 Subject: [PATCH] fix bug --- sfpy/posit.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sfpy/posit.pyx b/sfpy/posit.pyx index d75cb09..f2f76a7 100644 --- a/sfpy/posit.pyx +++ b/sfpy/posit.pyx @@ -1032,12 +1032,12 @@ cdef class Quire32: if not isinstance(value, int): raise TypeError('expecting int, got {}'.format(repr(value))) - for idx in range(1, -1, -1): + for idx in range(7, -1, -1): obj._c_quire.v[idx] = value & 0xffffffffffffffff value >>= 64 if not (value == 0): - raise OverflowError('value too large to fit in uint64_t[2]') + raise OverflowError('value too large to fit in uint64_t[8]') return obj @@ -1049,7 +1049,7 @@ cdef class Quire32: self._c_quire.v[idx] = value & 0xffffffffffffffff value >>= 64 if not (value == 0): - raise OverflowError('value too large to fit in uint64_t[2]') + raise OverflowError('value too large to fit in uint64_t[8]') else: f = float(value) self._c_quire = cposit.q32_clr(self._c_quire) -- 2.30.2