Skip to content

numpy_quaddtype smallest_subnormal is wrong #140

@juntyr

Description

@juntyr
numpy_quaddtype.get_sleef_constant("smallest_subnormal")

returns QuadPrecision('3.362103143112093506262677817321753e-4932', backend='sleef'), which does not match the documented 2^-16494 from https://sleef.org/quad.xhtml.

The implementation here

else if (strcmp(constant_name, "smallest_subnormal") == 0) {
result->value.sleef_value = SLEEF_QUAD_DENORM_MIN;
}

looks correct, is the macro defined in the wrong way?

In any case, we should fix this and add tests for all exposed constant values.

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