From: Gary Wright Date: 2009-01-10T06:22:08+09:00 Subject: Re: Behavior of 0 and 0.0... --Apple-Mail-106--174122131 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On Jan 9, 2009, at 3:51 PM, Raphael Clancy wrote: > I was playing around with the basic math functions, and I had some > questions about the way Ruby handles operations with 0 and 0.0. I'm guessing that you are seeing IEEE floating point behavior with the floating point operations and that there isn't a perfect analog to that behavior with integer operations. IEEE floating point defines binary representations of negative and positive zero, negative and positive infinity, and two types of NaN (not a number). These 'numbers' aren't available when working with integers at the machine level nor at the Ruby Fixnum or Bignum level. Gary Wright --Apple-Mail-106--174122131--