i don’t know if thats a problem or the way it is, but i need a value with 2 decimal places. I can write a function to round it 2 decimal places, but is there a solution where in clojure itself handles it while adding. i mean by changing data type or something.
Thank you.
Clojure uses java’s standard Double precision floating point numbers under the hood (as of 1.3) and the REPL only prints as many digits as it needs to to represent the number so in this case it is geting 3.0000000 … but dropping the unnecessary digits.
you can control the number printed with the handy format function.