Skip to content

Commit

Permalink
removed unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
stla committed Feb 20, 2023
1 parent 5383bbb commit 811154e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cradle:
cabal:
4 changes: 0 additions & 4 deletions tests/Approx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ approx0 n x = fromInteger (round $ x * (10^n)) / (10.0^^n)
approx :: Int -> Complex Double -> Complex Double
approx n z = approx0 n (realPart z) :+ approx0 n (imagPart z)

-- check whether rounded z1 and rounded z2 are equal
approxEqual :: Int -> Complex Double -> Complex Double -> Bool
approxEqual n z1 z2 = magnitude (approx n z1 - approx n z2) == 0.0

assertApproxEqual :: String -> Int -> Complex Double -> Complex Double -> Assertion
assertApproxEqual prefix n z1 z2 =
assertEqual prefix (approx n z1) (approx n z2)

0 comments on commit 811154e

Please sign in to comment.