Skip to content

wsint64 with small numbers #58

@brunopalos

Description

@brunopalos

Hi,

I think wsint64 has a bug with small positive numbers represented in 64bits. When the more significative 32 bits are all zeros vzposwill be false because value[0] * Number.POSITIVE_INFINITY is NaN, causing the number to be considered negative throwing value smaller than minimum allowed value error.

It seems to work fine with all other kinds of signed numbers.

I suggest a PR to fix this and to consider zero a positive number on that function. Do you agree?

Thanks,
Bruno

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions