zero up memory

K

Kleuske

The loss of transitivity can be a problem, though. With such a
definition of equality, x == y && y == z doesn't imply x == z.

Correct. That's one of the problems. It's not one that keeps me awake
at night, though. At least in the context I used it in.
 
J

James Kuyper

Please describe how to calculate epsilon, given a situation where you'd
use it,

For many purposes I want to cope with the possibility that ratio =
numerator/denominator might overflow, by checking whether |denominator|
<= epsilon, where epsilon = DBL_MAX/|numerator|.
with a good reason why it shouldn't be larger or smaller by
even a little bit. ...

The concept that any floating point number (including epsilon) must have
some particular exact value is inconsistent with the ubiquity of
floating point round-off errors.
 
E

Eric Sosman

For many purposes I want to cope with the possibility that ratio =
numerator/denominator might overflow, by checking whether |denominator|
<= epsilon, where epsilon = DBL_MAX/|numerator|.


The concept that any floating point number (including epsilon) must have
some particular exact value is inconsistent with the ubiquity of
floating point round-off errors.

Every floating-point number, except for infinities and NaN's on
systems that provide them, has an exact value.

It mightn't be the value you hoped for, but it's exact.
 
J

James Kuyper

Every floating-point number, except for infinities and NaN's on
systems that provide them, has an exact value.

It mightn't be the value you hoped for, but it's exact.

The value that you were hoping it to have which is not necessarily
exactly the same as the value it actually has, at least not it if it's
the result of several intermediate calculations. and that's what I was
talking about.
 
J

James Kuyper

On 03/13/2012 01:58 AM, Gordon Burditt wrote:

I explicitly told you that "Permission to quote this message, or any
part thereof, without proper attribution is denied." I realize that you
have fears about the supposed dangers of properly attributing your
quotations - but I insist that, at least where my messages are involved,
you deal with those fears by either temporarily ignoring them, or by not
quoting me.
And you check that this value of epsilon doesn't overflow first, right?

Ugh! Better yet, when I'm adequately awake, I check to make sure the
expression was correct:

epsilon = |numerator|/DBL_MAX

That calculation cannot overflow.
 

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

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top