RationalEpsilon Field |
Namespace: Accord.Math
This field has a value of 1 / 2,147,483,647.
This does NOT represent the minimum possible difference between two Rational instances; some rationals may have a smaller difference. If you try to subrtact two rationals whose difference is smaller than this value, you will get unexpected results due to overflow.
if (r1 + Rational.Epsilon > r2 && r1 - Rational.Epsilon < r2) { // Difference between r1 and r2 is less than Rational.Epsilon. }