summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-29 00:42:05 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-29 00:42:05 +0000
commit000f1c5b759ba08b8ca29456376202e4d5536812 (patch)
tree5e9985d74843921b28cb5e5b4502fae2206e9355
parentb2eb38fac5a0e5a8360d8d9d1e57287dcde04ba6 (diff)
Add links about floating point. [ruby-core:31849]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--numeric.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 740ef5442d..25c9e73e44 100644
--- a/numeric.c
+++ b/numeric.c
@@ -533,6 +533,13 @@ num_to_int(VALUE num)
* <code>Float</code> objects represent inexact real numbers using
* the native architecture's double-precision floating point
* representation.
+ *
+ * Floating point has a different arithmetic and is a inexact number.
+ * So you should know its esoteric system. see following:
+ *
+ * - http://docs.sun.com/source/806-3568/ncg_goldberg.html
+ * - http://wiki.github.com/rdp/ruby_tutorials_core/ruby-talk-faq#floats_imprecise
+ * - http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
*/
VALUE