Fork me on GitHub
#exercism
<
2022-04-30
>
Nundrum18:04:03

Is this some sort of bug in the test for complex-numbers?

Divide numbers with real and imaginary part
expected: (= (c/div [1 2] [3 4]) [0.44 0.08])
  actual: (not (= [0.44 0.08] [0.44 0.08]))

Bobbi Towers15:05:49

My guess would be that it's comparing doubles with floats. Could you post the div function?

Nundrum20:05:50

Yes, that was it. Thanks!

Bobbi Towers23:05:21

Somebody actually just filed an issue with this same exact test case, and I figured it must have been you but it turns out not: https://github.com/exercism/clojure/issues/478 What are the chances? 😂

Nundrum00:05:19

LOL I had started to fill in the bug report but hadn't hit submit yet 🙂