Skip to content

Commit

Permalink
fromIntegral -> getScalar
Browse files Browse the repository at this point in the history
  • Loading branch information
chessai committed Nov 6, 2019
1 parent 49d6195 commit 0fe3725
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/ArrayFire/ArithSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ shouldBeEps :: Array Double -> Array Double -> Expectation
actual `shouldBeEps` expected = expect err_msg (cmpEps actual expected)
where
err_msg = "expected: " ++ show expected ++ "\n but got: " ++ show actual
cmpEps :: Array Double -> Array Double -> Bool
cmpEps a b =
let x :: Double
x = fromIntegral $ Prelude.abs $ a - b
x = getScalar $ Prelude.abs $ a - b
in x <= 1e-14

expect :: String -> Bool -> Expectation
Expand Down

0 comments on commit 0fe3725

Please sign in to comment.