Skip to content

fix: NaN comparison to match .NET total ordering#4747

Open
Thorium wants to merge 1 commit into
fable-compiler:mainfrom
Thorium:fix-compare-nan-ordering
Open

fix: NaN comparison to match .NET total ordering#4747
Thorium wants to merge 1 commit into
fable-compiler:mainfrom
Thorium:fix-compare-nan-ordering

Conversation

@Thorium

@Thorium Thorium commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

comparePrimitives returned 1 for any NaN operand, violating antisymmetry and corrupting sort order of float collections containing NaN. .NET Double.CompareTo: NaN equals NaN and is less than any other value.

(split from #4738)

comparePrimitives returned 1 for any NaN operand, violating antisymmetry
and corrupting sort order of float collections containing NaN.
.NET Double.CompareTo: NaN equals NaN and is less than any other value.
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