Example #1
0
 /// <summary>
 /// Checks whether a number is zero
 /// </summary>
 /// <param name="num"></param>
 /// <returns></returns>
 public static bool IsZero(RealNumber num)
 {
     if (!num.IsDefinite())
     {
         return(false);
     }
     return(Functional.IsZero(num.Value));
 }
 internal static bool AreEqual(RealNumber a, RealNumber b)
 => a.IsDefinite() && b.IsDefinite() && Math.Abs(a.Value - b.Value) < MathS.Settings.PrecisionErrorCommon ||
 a.State == b.State && !a.IsDefinite();