-----BEGIN PGP SIGNED MESSAGE-----

In article <20020530145523.GA25662 / panoptic.com>,
Dossy  <dossy / panoptic.com> wrote:
>On 2002.05.30, Paul Brannan <pbrannan / atdesk.com> wrote:
>> On Thu, May 30, 2002 at 10:05:24PM +0900, Dossy wrote:
>> > Float allowing division by zero is certainly not of least surprise
>> > to me.  ;-)
>> 
>> A Float is implemented by a C double.  A Fixnum is a C long.  In C, a
>> long can be only a number, but a double has many special values
>> (particularly NaN, inifinity, and positive/negative zero).
>> 
>> For Ruby to work any other way would surprise me.
>
>Considering that Ruby is an OO language, the fact that the
>implementation is so tightly coupled to the underlying architecture
>surprises me.
>
>Just as true, false and nil are instances of TrueClass, FalseClass
>and NilClass, I would have assumed infinity to be an instance of
>Number, along with NaN being an instance of Number as well.
>Or, something like that.
>

Infinity and NaN are part of the IEEE floating point number
standard. It's not just a C thing, but the standard behaviour
for floating point numbers on a computer. There is no similar
standard for integers. 

- - Booker C. Bense 


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBPPpFzgD83u1ILnWNAQFuVgQAsOhjC6NYW+KnqWzXs07eI8qnlRbrpT/L
+W38leXs3xJSnUl2LJCPe9GL2RPiX/6pgq/4ds0iIGHBVhAN2TKULnvfQRopAZzP
tNQF0pmJ8l0NyhyMR2V/WRa+xxOfQyE1Ekl0+5dyxAsqHoKV8JVwtN99vUpnmoUg
+cSnJ6yCbeo=
=VBvN
-----END PGP SIGNATURE-----
--