Skip to main content
Brie's user avatar
Brie's user avatar
Brie's user avatar
Brie
  • Member for 4 years, 1 month
  • Last seen more than 3 years ago
  • Earth
awarded
awarded
awarded
awarded
awarded
awarded
comment
Which is preferred: subclass double or create extension methods to test (relative) equality due to floating point differences?
@Christophe also using 0.0000001 is going to be the same as using any other constant. Comparing two doubles in C#/.NET is not "subject to rounding issues."
comment
Which is preferred: subclass double or create extension methods to test (relative) equality due to floating point differences?
@Christophe because Double.Epsilon is ~5e-324, which is way beyond the floating point error ranges. Using that results in essentially overloading ==/</>.
awarded
awarded
Loading…
awarded
comment
Which is preferred: subclass double or create extension methods to test (relative) equality due to floating point differences?
I was unnecessarily specific - this is really only tangentially financial-related; see edits. Your points are well-taken.
awarded
Loading…
Loading…