I have a procedure that returns a float to three decimal places.
>(gpa ’(A A+ B+ B))
3.665
Is there any way to round this to 3.67 in Scheme?
I'm using SCM version 5e7 with Slib 3b3, the additional Simply Scheme libraries (simply.scm, functions.scm, ttt.scm, match.scm, database.scm) and the answer library I use loaded.
As an aside, I input this into my computer this morning
> (* 1 (- 0.5 0.4 0.1))
-27.755575615628913e-18
no no no no!
How do you deal with such inaccuracy?