3 ms·
Yow. C# defines something it calls "double.Epsilon" but it isn't the machine epsilon as generally understood (i.e., the smallest thing you can add to 1 and get
by gjm11 16y ago
Yow. C# defines something it calls "double.Epsilon" but it isn't the machine epsilon as generally understood (i.e., the smallest thing you can add to 1 and get something bigger than 1), it's the smallest representable (denormalized!) positive double. In other words, something like 10^-324 rather than about 10^-16.
[EDITED to add: this isn't the only gotcha he describes, but it's the scary one because if all you know is that C# has a thing called double.Epsilon, it likely won't even occur to you that it might be anything other than the machine epsilon. It's as if they'd defined something called "CPUClockRate" but it was the number of scheduler ticks per second instead of the clock speed, or something.]