2011/6/23 Ondj Bka <neleai / seznam.cz>:
> On Fri, Jun 24, 2011 at 12:33:32AM +0900, Robert Klemme wrote:
>> 2011/6/22 Ondj Bka <neleai / seznam.cz>:
>> > On Tue, Jun 21, 2011 at 11:30:46PM +0900, Robert Klemme wrote:
>> >> 2011/6/21 Ondj Bka <neleai / seznam.cz>:
>> >> > On Tue, Jun 21, 2011 at 04:06:05PM +0900, Robert Klemme wrote:
>> >> >> 2011/6/18 Ondj Bka <neleai / seznam.cz>:
>> >> >>
>> >> >> > Are there reasons other than historic that coerce returns converted pair instead
>> >> >> > returning directly result of operation like
>> >> >> > def coerce2(x,op)
>> >> >> > .to_foo.call(op,self)
>> >> >> > end
>> >> >>
>> >> >> http://blog.rubybestpractices.com/posts/rklemme/019-Complete_Numeric_Class.html
>> >> > Why should Hexnum.new(1)+0.5==Hexnum.new(1)+0.6
>> >>
>> >> ?
>> > Well if you write you should be sure that you did basic things rigth.
>> > Skimming through article there following issues
>>
>> When doing extensive criticism you should probably not being
>> "skimming". ince HexNum is an integer type it's pretty obvious that
>> x + 0.5 == x + 0.6 - regardless of what rounding is applied.
> Well you should either convert hexnum to float or raise error.

No.  This was a design decision.  (As you are probably aware there is
other math which sacrifices precision for other objectives.)

Regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/