Repro on x86 and arm. fi = FormatInfo(name='binary32', k=32, precision=24, emax=127, has_nz=True, has_infs=True, num_high_nans=8388607, has_subnormals=True) i = -2147435927 def decode_float(fi: FormatInfo, i: int) -> FloatValue: """ Given :py:class:`FormatInfo` and integer code point, decode to a :py:class:`FloatValue` :param fi: Foating point format descriptor. :type fi: FormatInfo :param i: Integer code point, in the range :math:`0 \le i < 2^{k}`, where :math:`k` = ``fi.k`` :type i: int :return: Decoded float value :rtype: FloatValue :raise ValueError: If i is outside the range of valid code points in fi. """ k = fi.k p = fi.precision t = p - 1 # trailing significand field width w = k - p if i < 0 or i >= 2**k: > raise ValueError(f"Code point {i} not in range [0, 2**{k})") E ValueError: Code point -2147435927 not in range [0, 2**32) fi = FormatInfo(name='binary32', k=32, precision=24, emax=127, has_nz=True, has_infs=True, num_high_nans=8388607, has_subnormals=True) i = -2147435927 k = 32 p = 24 t = 23 w = 8 ../gfloat-0.0.5-python3_12/install/usr/lib/python3.12/site-packages/gfloat/decode.py:30: ValueError
Created attachment 895008 [details] build.log and emerge --info (x86)
Created attachment 895009 [details] build.log and emerge --info (arm)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2032cfb7f9331431e407f177c4afafa536b20eb4 commit 2032cfb7f9331431e407f177c4afafa536b20eb4 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2024-06-11 04:08:25 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-06-11 04:19:59 +0000 dev-python/gfloat: Bump to 0.3 Closes: https://bugs.gentoo.org/933491 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-python/gfloat/Manifest | 1 + dev-python/gfloat/gfloat-0.3.ebuild | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+)