Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: N/A
    • Component/s: None
    • Labels:
      None

      Description

      Even after all these years there is a steady stream of bugs in decimal math.
      We need a proactive approach instead, to try to find as many decimal bugs as
      possible.

      Suggestion: RQG testing of the expression

      ABS(CAST(a + b AS DOUBLE)/(CAST(a AS DOUBLE) + CAST(b AS DOUBLE)) - 1) < 0.0001
      

      where RQG randomly generates a and b, and the operation is one of +,
      -, *, /, mod.

      One should try also very small numbers (0.00...{~50 times}...01) as well as
      large ones.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              This query works okay in 5.5.40 candidate, but wrong in MySQL 5.5 (apparently that's the same problem as the one Sergei Golubchik solved in the post-merge fix).

              MySQL [test]> select 0.0000000001 % 1;
              +------------------+
              | 0.0000000001 % 1 |
              +------------------+
              |     0.1000000000 |
              +------------------+
              1 row in set (0.00 sec)
              
              Show
              elenst Elena Stepanova added a comment - This query works okay in 5.5.40 candidate, but wrong in MySQL 5.5 (apparently that's the same problem as the one Sergei Golubchik solved in the post-merge fix). MySQL [test]> select 0.0000000001 % 1; +------------------+ | 0.0000000001 % 1 | +------------------+ | 0.1000000000 | +------------------+ 1 row in set (0.00 sec)

                People

                • Assignee:
                  elenst Elena Stepanova
                  Reporter:
                  serg Sergei Golubchik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: