Skip to content

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