MongoShell numberDecimalsAlmostEqual(NumberDecimal(0), NumberDecimal(0)) returns false

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • v6.0
    • QE 2022-08-08, QE 2022-08-22
    • 160
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Shell function `numberDecimalsAlmostEqual` returns false when passing two zeros as an input.

      The reason for that is taking logarithm of the values, which is `NaN` for 0.

      The whole approximated comparison algorithm works under assumption that these values are not zero.

            Assignee:
            Denis Grebennicov
            Reporter:
            Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: