Skip to content

QuadDtype -> bool cast is wrong #41

@juntyr

Description

@juntyr

In

https://github.com/numpy/numpy-user-dtypes/blob/48260301b3d01a209469e1ff838ace50f5e00e06/quaddtype/src/csrc/casts.cpp#L1214-L1224

we cast SLEEF quad to int and then check if the result is non-zero. This means that small non-zero values, which are also cast to integer zero, count as Falsy, even though they should be True. We should instead compare with SLEEF zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions