views:

418

answers:

3

When i do (/ 411 125) , i dont get it in terms of decimal, how do I do that?

+3  A: 

As documented, integer division yields rational numbers. Try

(/ 411.0 125)
Jonathan Feinberg
+3  A: 

If you use a float for the dividend, you'll get a decimal answer.

(/ 22.0 7) -> 3.142857142857143

There's also the (unchecked-remainder x y) function available.

ire_and_curses
+7  A: 
user> (float (/ 411 125))
3.288
user> (double (/ 411 125))
3.288
Brian Carper