Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933491 - dev-python/gfloat-0.0.5 fails tests on 32-bit
Summary: dev-python/gfloat-0.0.5 fails tests on 32-bit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-06-03 20:15 UTC by matoro
Modified: 2024-06-11 04:20 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (x86) (file_933491.txt,29.23 KB, text/plain)
2024-06-03 20:15 UTC, matoro
Details
build.log and emerge --info (arm) (file_933491.txt,29.15 KB, text/plain)
2024-06-03 20:15 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-06-03 20:15:01 UTC
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
Comment 1 matoro archtester 2024-06-03 20:15:22 UTC
Created attachment 895008 [details]
build.log and emerge --info (x86)
Comment 2 matoro archtester 2024-06-03 20:15:38 UTC
Created attachment 895009 [details]
build.log and emerge --info (arm)
Comment 3 Larry the Git Cow gentoo-dev 2024-06-11 04:20:16 UTC
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(+)