What is the proper way to read (parse) real numbers in Common Lisp?
The problem is, that I have to read relatively large real numbers, and both SBCL and CLISP fail:
- Code: Select all
[4]> (- (read-from-string "1169991858.90605") 1169991859.32605)
0.0
[5]> (- (read-from-string "1169991858.90605") (read-from-string "1169991859.32605"))
0.0
On SBCL, I have PARSE-NUMBER package installed, but it also fails in a similar way:
- Code: Select all
* (- (parse-number:parse-number "1169991858.90605") 1169991859.90605)
0.0
* (parse-number:parse-number "1169991858.90605")
1.1699918e9
The numbers are actually a number of seconds from the Unix Epoch.
Thank you