Skip to content

Fix ArraySeq.ofFloat/ofDouble.equals for floating point#11083

Merged
lrytz merged 1 commit intoscala:2.13.xfrom
eejbyfeldt:i13108
Jun 30, 2025
Merged

Fix ArraySeq.ofFloat/ofDouble.equals for floating point#11083
lrytz merged 1 commit intoscala:2.13.xfrom
eejbyfeldt:i13108

Conversation

@eejbyfeldt
Copy link
Copy Markdown
Contributor

@eejbyfeldt eejbyfeldt commented Jun 27, 2025

This fixes scala/bug#13108 when comparing Seq[Float] with Seq[Float] it expected
that Float.NaN != Float.NaN and 0.0 equals -0.0f. But before this patch
this was violated by ArraySeq.ofFloat/ofDouble

This fixes #13108 when comparing Seq[Float] with Seq[Float] it expected
that Float.NaN != Float.NaN and 0.0 equals -0.0f. But before this patch
this was violated by ArraySeq.ofFloat/ofDouble
@scala-jenkins scala-jenkins added this to the 2.13.17 milestone Jun 27, 2025
@eejbyfeldt eejbyfeldt marked this pull request as ready for review June 27, 2025 08:48
Copy link
Copy Markdown
Contributor

@Ichoran Ichoran left a comment

Choose a reason for hiding this comment

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

LGTM--looks like a straightforward and effective implementation of element-by-element equality!

Copy link
Copy Markdown
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

Thank you!

@lrytz lrytz merged commit 8591b6a into scala:2.13.x Jun 30, 2025
3 checks passed
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request Sep 24, 2025
Fix ArraySeq.ofFloat/ofDouble.equals for floating point
@SethTisue SethTisue added the library:collections PRs involving changes to the standard collection library label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

library:collections PRs involving changes to the standard collection library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArraySeq.ofFloat/ofDouble have wrong equals behavior

5 participants