Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23572

Possible inaccuracy in modulo operations with decimal (double) values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
    • Fix Version/s: 10.5
    • Component/s: Data types
    • Labels:

      Description

      65ee216c

      MariaDB [test]>  select 6678771973.49019 % 0.34632873535156 AS a;
      +------------------+
      | a                |
      +------------------+
      | 0.00264360672516 |
      +------------------+
      1 row in set (0.001 sec)
       
      MariaDB [test]>  select 6678771973.49019 % CAST(0.34632873535156 AS DOUBLE) AS a;
      +-----------------------+
      | a                     |
      +-----------------------+
      | 0.0026431204981313683 |
      +-----------------------+
      1 row in set (0.001 sec)
      

      The difference is probably expected to be smaller.

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration