0

I'm new to clojure and learning basic built in functions. I noticed some weird error when summing values.

user=> (+ 0.99 10 10) 20.990000000000002

user=> (+ 0.99 30 10) 40.989999999999995

However, (+ 0.99 10 30) gives the expected result, 40.99. What do you think is causing this? I'm just using the terminal window on Mac and clj command for the clojure repl. Thank you.

1 Answers1

0

This appears to be the same question as posted on Reddit (and answered there): https://www.reddit.com/r/Clojure/comments/nia8lo/weird_partial_error/

Sean Corfield
  • 6,297
  • 22
  • 31