I haven't used the Boost libraries at all, been out of the C++ ecosystem for a while now.
Complex numbers are super useful for physics stuff and also for optimisation. I just implemented it as a practice exercise, would be really surprised if there isn't a library for complex numbers already existing in Clojure.
One really cool feature in Clojure is the symbolic representation of rational numbers:
(/ 1 3)
evaluates to 1/3 rather than 0.3333. This allows more precise calculations, as rounding only needs to be done at the end.
Posted Using LeoFinance Beta