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

Possible inaccuracy in modulo operations with decimal (double) values

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1, 10.2, 10.3, 10.4, 10.5
    • 10.5
    • Data types

    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

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.