Skip to content

Can't parse NaN #537

@ajf2

Description

@ajf2

I have some very big numbers coming in from another system. For some reason, these can be larger than double.MaxValue and will come in as double.NaN. They're converted to string then sent to UnitsNet's Parse method, which fails throwing an exception: "Invalid string detected: a".

I think what should happen is that you get a length (or whatever) with a value of NaN.

I've written a test and made a change to the number regex which seems to pass the test. I'll make a pull request soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions