lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] TAOCP [4.2.2]: to what can zero be "essentially equal"?


From: Greg Chicares
Subject: [lmi] TAOCP [4.2.2]: to what can zero be "essentially equal"?
Date: Thu, 15 Feb 2018 00:45:15 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

Professor--in 'materially_equal.hpp' I claim:

/// This is the "essentially equal to" operator defined in Knuth,
/// TAOCP, volume 2, section 4.2.2, equation (34), on page 219 of the
/// second edition.

  tolerance = 1.0E-13
  std::fabs(t - u) <= tolerance * std::min(std::fabs(t), std::fabs(u))

But is that comment rigorous, even though I seem to have translated
equation (34) faithfully?

(1) Knuth says that satisfying this test implies "essential" equality,
so it's a sufficient condition, and not a (biconditional) definition.
But I don't find anything in the text that's closer to a definition.

(2) Can any nonzero value be considered "essentially" equal to zero?
The above code determines that 1e-100 is not essentially zero for the
given tolerance of 1e-13; is that sensible? and would Knuth agree or
disagree with that conclusion--or has he perhaps chosen to leave the
answer undefined?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]