Hacker News new | ask | show | jobs
by verandacoffee 2251 days ago
sbcl (and other Common Lisps) uses what you want it to use: read-default-float-format

(setf read-default-float-format 'single-float) (+ 0.1 0.2) => 0.3

(setf read-default-float-format 'double-float) (+ 0.1 0.2) => 0.30000000000000004

On LispWorks 7.0 I get 0.30000000000000005 for double-float. Hmm.