[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23224] Re: [Bug #1336] Change in string representation of Floats

From: Ondrej Bilka <neleai@...>
Date: 2009-04-17 04:21:34 UTC
List: ruby-core #23224
On Fri, Apr 17, 2009 at 03:14:20AM +0200, Gary Wright wrote:
>
> On Apr 16, 2009, at 12:29 PM, Shot (Piotr Szotkowski) wrote:
>>> I would have thought that z.eql?(nz) might be false. There doesn't
>>> seem to be a way to query a float to distinguish between -Infinity
>>> and Infinity
>>
>> These actually aren’t ==, eql? nor equal?
>
> I wasn't very clear.  My point was that you have to do two tests to  
> determine if an arbitrary float is negative infinity or positive  
> infinity.
>
> def negative_infinity?(x)
>   !x.finite? and x < 0
> end
I can test normaly.
irb(main):019:0> x=1.0/0
=> Infinity
irb(main):020:0> y=-1.0/0
=> -Infinity
irb(main):021:0> x==y
=> false
-- 

The CPU has shifted, and become decentralized.

In This Thread