News for hackers. Stuff that matters.
Re:Show HN: Code Words, a quarterly publication about progra... by copascetic on Saturday December 06, 2014 @01:09AM (#8708542)
When you specify the types of the numbers used, so that you are testing the transitivity of a single instance of Eq, you will find that transitivity does hold in this case.

  a :: Double
  a = 2^53

  b :: Double
  b = 2.0^53

  c :: Double
  c = 2^53 + 1

  main :: IO ()
  main = do
    print $ a == b -- True
    print $ b == c -- True
    print $ a == c -- True

There are no comments on this comment yet.