2011/6/23 Ond=F8ej B=EDlka <neleai / seznam.cz>:
> On Fri, Jun 24, 2011 at 12:33:32AM +0900, Robert Klemme wrote:
>> 2011/6/22 Ond=F8ej B=EDlka <neleai / seznam.cz>:
>> > On Tue, Jun 21, 2011 at 11:30:46PM +0900, Robert Klemme wrote:
>> >> 2011/6/21 Ond=F8ej B=EDlka <neleai / seznam.cz>:
>> >> > On Tue, Jun 21, 2011 at 04:06:05PM +0900, Robert Klemme wrote:
>> >> >> 2011/6/18 Ond=F8ej B=EDlka <neleai / seznam.cz>:
>> >> >>
>> >> >> > Are there reasons other than historic that coerce returns conver=
ted pair instead
>> >> >> > returning directly result of operation like
>> >> >> > def coerce2(x,op)
>> >> >> > =A0 =A0 =A0 =A0x.to_foo.call(op,self)
>> >> >> > end
>> >> >>
>> >> >> http://blog.rubybestpractices.com/posts/rklemme/019-Complete_Numer=
ic_Class.html
>> >> > Why should Hexnum.new(1)+0.5=3D=3DHexnum.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". =A0Since HexNum is an integer type it's pretty obvious that
>> x + 0.5 =3D=3D 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

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