Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equality is 0 #4493

Merged
merged 2 commits into from
Mar 12, 2018
Merged

Equality is 0 #4493

merged 2 commits into from
Mar 12, 2018

Conversation

forki
Copy link
Contributor

@forki forki commented Mar 12, 2018

This is weird. I believe this needs to be a zero - in symmetry with the float case.

But I tried to trigger the bug and it could not repro.

image

@dsyme
Copy link
Contributor

dsyme commented Mar 12, 2018

Thanks for the fix. To repro you have to open NonStructuralComparison (a very rarely used way of turning off structural comparison).

>  let f() = printfn "hello"; 0.0f * 0.0f;;
val f : unit -> float32

>  compare (f()) (f());;
hello
hello
val it : int = 1

@forki
Copy link
Contributor Author

forki commented Mar 12, 2018

ok let me add a test

@forki
Copy link
Contributor Author

forki commented Mar 12, 2018

done

@dsyme dsyme merged commit 2521f81 into dotnet:master Mar 12, 2018
@forki forki deleted the compare branch March 12, 2018 18:19
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.

3 participants