Skip to content

Support for NaN and -0 #51

@sffc

Description

@sffc

Related to #50, but on the separate issue of supporting NaN and -0, the other special values that are allowed in Number and IntlMV.

Many of the same arguments in favor of Infinity apply to NaN and -0: most everything else supports them, and if Amount is trying to build on top of existing numeric types, it should support them, too.

The main difference with Infinity is that the use cases are more limited. NaN is mainly useful as the result of an expression like 0/0, but we don't directly support arithmetic in Amount. I'm not aware of strong use cases for NaN in finance of scientific computing; it usually indicates a bug in the software. I feel similarly with -0.

CC @waldemarhorwat

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