Skip to content

Conversation

@exyi
Copy link
Member

@exyi exyi commented Aug 20, 2025

Resolves #1400

@exyi exyi requested review from Copilot and tomasherceg August 20, 2025 14:51

This comment was marked as resolved.

return { value: +value, wasCoerced: value !== +value };
}

if (value != value || value === "NaN") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (value != value || value === "NaN") {
if (Number.isNaN(value) || value === "NaN") {

@exyi exyi merged commit d0383e9 into main Sep 28, 2025
14 checks passed
@exyi exyi deleted the float-nans branch September 28, 2025 10:22
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.

Handle floating point NaN, Infinity and -Infinity

3 participants