From: Kenta Murata Date: 2011-09-14T09:18:38+09:00 Subject: [ruby-core:39533] Re: [Ruby 1.9 - Feature #5310][Open] Integral objects Hi, On Wednesday, September 14, 2011 at 06:23 , brian ford wrote: > There is some inconsistency between your proposal and what has been implemented: We can change the implementation according to the proposal if accepted. > A Float value is a machine approximation of a mathematical real > number. A BigDecimal is an exact representation of a real number. The > mathematical real numbers embed the integers. You are not right. A BigDecimal is a floating-point number same as a Float except for internal representation. So, A BigDecimal is also approximation of a real number, in other words, a BigDecimal has error as well as a Float does. It is right understanding because I am the master of bigdecimal. > It is untrue that Float numbers cannot be consistently represented as > integral values. It is merely up to the language to define them as > such. Ruby already takes liberties with defining mathematical > operations (see http://redmine.ruby-lang.org/issues/3289). I know. I suggest to change for number system. > To remove #to_int from Float and BigDecimal and partially from > Rational and Complex introduces typing concepts where none are needed, > breaks consistent polymorphism, and breaks compatibility with 1.8 and > prior 1.9. Yes, my proposal introduces incompatibility, so I propose this for 2.0. -- Kenta Murata Sent with Sparrow (http://www.sparrowmailapp.com)