Icon View Incident Report

Serious Serious
Reported By: Donat Hebert
Reported On: 9/18/2003
For: Version 3.25 Build 1
# 1420 ROUND() Function Not Working Properly

I'm not sure if this has been reported yet but this code will reproduce the problem:

DROP TABLE IF EXISTS "CkRound";

CREATE TABLE IF NOT EXISTS "CkRound"
(
   "SField" CHARACTER(10),
   "F1" FLOAT,
   "F2" FLOAT,
PRIMARY KEY ("SField") COMPRESS NONE
LANGUAGE "ANSI Standard" SORT "Default Order"
USER MAJOR VERSION 1
);

INSERT INTO "CkRound" VALUES (
         "A" , 3 , 15) NOAUTOINC;
INSERT INTO "CkRound" VALUES (
         "B" , 3 , 14) NOAUTOINC;
INSERT INTO "CkRound" VALUES (
         "C" , 3 , 13) NOAUTOINC;

Select SField, F1, F2, Round(f1/f2*100 to 2) as F3, Round(f1/f2*100 
to 0)
as F4
from CkRound;



Comments Comments
This was caused by the fix in 3.25 to try to correct rounding accumulation errors for floating-point numbers (incident # 1372).


Resolution Resolution
Fixed Problem on 9/15/2003 in version 3.26 build 1
Image