Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18168

SQL: incorrect sum of several FLOAT values

    XMLWordPrintableJSON

Details

    • Docs Required, Release Notes Required

    Description

      This behavior seems incorrect:

      create table xx (key_field INT PRIMARY KEY,field2 FLOAT);
      insert into xx (key_field,field2) values (1, 100000);
      insert into xx (key_field,field2) values (2, 50000);
      insert into xx (key_field,field2) values (3, 30000);
      insert into xx (key_field,field2) values (4, 55555.1);
      insert into xx (key_field,field2) values (5, 30000);
      insert into xx (key_field,field2) values (6, 40000);
      insert into xx (key_field,field2) values (7, 20000);
      insert into xx (key_field,field2) values (8, 80000);
      insert into xx (key_field,field2) values (9, 30000);
      insert into xx (key_field,field2) values (10,90000);
      insert into xx (key_field,field2) values (11,90000);
      SELECT SUM(field2) FROM xx;                                
      --> returns 615555.1015625, expected 615555.1
      

       

      Attachments

        Activity

          People

            amashenkov Andrey Mashenkov
            akhitrin Andrey Khitrin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: