taken from wiki:Scheme_(programming language)
所在版块:求学狮城 发贴时间:2008-09-02 18:19

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
"The numeric type is further divided into a numerical tower, with subtypes complex, real, rational and integer. (Note that these subtypes are not disjoint; in fact each type is a subset of the previous one). While it is not required that a Scheme implementation support the entire numerical tower, most implementations do. In addition to these traditional properties, Scheme numbers may have the property of "exactness". Integers and rational numbers are exact. An arithmetic operation involving numbers one or more of which is inexact has an inexact result.[1]"

In other words, some implementation of real numbers of scheme is imprecise.
Besides, I don't think Java has such problem.

.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!


You may say I'm a dreamer
but I'm not the only one...
 相关帖子 我要回复↙ ↗回到正文
一个编程的小问题 EnyaLinn   (220 bytes , 723reads )
taken from wiki:Scheme_(programming language) simon   (687 bytes , 465reads )
"平方1.2,结果是1.2100000000000002" means you got a typo, :P 香陵居士   (0 bytes , 328reads )
试试把1.2转换成二进制数 hash   (186 bytes , 415reads )