output format of float
I am using MIT/GNU开发者_如何学运维 Scheme. If I calculate two integers' quotient and the quotient is float, the output is not a float number, but two number's expression, like: 12222222222222232/2344444444412. How can I get a float format output?
Use the exact->inexact
function:
(let ((x (/ 5 7)))
(let ((f (exact->inexact x)))
(display f)))
精彩评论