code: private static boolean numbersEqual(Number a, Number b) {
          if (a.equals(b)) {
              return true;
          }
          if (a.doubleValue() == b.doubleValue()) {
              return true;
          }
          return false;
      }
docs: TODO improve this to catch more cases (two different longs that have same double values, BigDecimals, etc)