Konfusius wrote:You can convert rationals to floats:
(float (+ 232/100 1/1000))
-> 2.321
Technically, that (somewhat) reintroduces the problem...
L> (format t "~E" (float (+ 232/100 1/1000)))
2.3210001e+0
NIL
L> (= 2.3210001 (float (+ 232/100 1/1000)))
T
The Right Thing[TM] would be to use something like
Wu-Decimal:
L> (ql:quickload "wu-decimal")
; Loading "wu-decimal"
[package wu-decimal]...
("wu-decimal")
L> (wu-decimal:enable-decimal-printing-for-ratios)
NIL
L> (format t "~A" (+ 232/100 1/1000))
2.321
NIL
Of course, I'm nitpicking. If you're just hacking something together to quickly visualize something, using floating point and rounding the results isn't so bad.