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

<negative value> MOD <fractional divisor> returns negative zero

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5.40
    • 10.5, 10.6, 10.11, 11.4, 11.8
    • None
    • None

    Description

      It doesn't look very dangerous, just strange:

      MariaDB [test]> select -1 % 0.1;
      +----------+
      | -1 % 0.1 |
      +----------+
      |     -0.0 |
      +----------+
      1 row in set (0.00 sec)

      Same in MySQL 5.6. PostgreSQL returns a normal zero.

      Attachments

        Issue Links

          Activity

            see also SELECT mod('-12',-4);

            serg Sergei Golubchik added a comment - see also SELECT mod('-12',-4);

            and many other cases. Likely, dtoa needs to be changed to never generate "-0" string

            serg Sergei Golubchik added a comment - and many other cases. Likely, dtoa needs to be changed to never generate "-0" string

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.