Skip to content

Binary instances for NaN and negative zero are broken#46

Closed
Shimuuar wants to merge 1 commit intohaskell:masterfrom
Shimuuar:nan
Closed

Binary instances for NaN and negative zero are broken#46
Shimuuar wants to merge 1 commit intohaskell:masterfrom
Shimuuar:nan

Conversation

@Shimuuar
Copy link
Contributor

@Shimuuar Shimuuar commented Feb 9, 2014

Roundtripping (decode . encode) NaN yields -∞ for both Float and Double and roundtripping negative zero gives oridinary zero.

This pull request only add tests for transfinite floating point values and does nothing to address issue. It's unclear to me whether it's possible to fix this without breaking encoding format in backward incompatible way.

QC doesn't generate such value so they should be listed explicitly
@konsumlamm
Copy link
Contributor

So if I understand correctly, this PR adds failing tests?

@Shimuuar
Copy link
Contributor Author

Shimuuar commented Mar 4, 2026

Yes. And I think incorrect ones in case of NaNs

@konsumlamm
Copy link
Contributor

What exactly is the point of adding failing tests?

@Shimuuar
Copy link
Contributor Author

It's been so long. I don't remember myself. I think it's better to close this PR

@Shimuuar Shimuuar closed this Mar 23, 2026
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.

2 participants