Ruby doesn't know how to multiply

N

Nobuyoshi Nakada

Hi,

At Mon, 25 Jun 2007 01:52:07 +0900,
Stefan Rusterholz 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= ? :)
 
A

Alex Young

Nobuyoshi said:
Hi,

At Mon, 25 Jun 2007 01:52:07 +0900,
Stefan Rusterholz 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= ? :)
Float#=~ isn't being used for anything...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,310
Members
47,977
Latest member
MillaDowdy

Latest Threads

Top