Ruby doesn't know how to multiply

On 6/21/07, Yukihiro M. [email protected] wrote:

  • fixed point number
  • base 10 floating numbers
  • comparison with epsilon

Does anyone know how these languages get the correct result?

Rick Denatale wrote:

matz,

I don’t know which Smalltalk he used, but I just tried it in Squeak
and it evalutes to false, just like in Ruby.

7.4

Logan C. wrote:

VisualWorks 7.4? (At least that seems to be a smalltalk with a version
number of 7.4).

(You are aware that theres more than one implementation of Smalltalk,
and to
give just a version number is very vague, right?)

oops! Sorry. Yes, it is VisualWorks 7.4

Hi,

At Mon, 25 Jun 2007 01:52:07 +0900,
Stefan R. wrote in [ruby-talk:256798]:

I think Float#== as it is is fine. Arguably it could use delta
comparison with Float::EPSILON and leave the exact comparison to eql?
But I’d like it if Float#in_delta(other, delta=Float::EPSILON) was in
core (personally I add it in my libs as Numeric#in_delta).

What about Float#neary= ? :slight_smile:

Nobuyoshi N. wrote:

Float#=~ isn’t being used for anything…