Skip to content

Fix NaN being printed out as -NaN#214

Open
Wain-PC wants to merge 1 commit intoalexei:masterfrom
Wain-PC:fix-nan
Open

Fix NaN being printed out as -NaN#214
Wain-PC wants to merge 1 commit intoalexei:masterfrom
Wain-PC:fix-nan

Conversation

@Wain-PC
Copy link

@Wain-PC Wain-PC commented Nov 22, 2021

I've encountered incorrect behavior in cases involving NaN.
Consider the following example:

sprintf('%f', NaN) // '-NaN'

The library always adds minus sign before NaN. This fix considers NaN as a positive by including an additional check during sign detection.

@msimerson msimerson mentioned this pull request Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant