Icon View Incident Report

Minor Minor
Reported By: Arnd Baranowski
Reported On: 11/15/2012
For: Version 2.11 Build 2
# 3682 TRUNC() Function Not Working Correctly with All Floating-Point Values

Trunc does not work correct in some casesl. A value of 0.59962 did get truncated to 0.5995.

Select
PC.Destination,
DC.Dialcode,
PC.TZCarrier,
PC.TZidentified,
Trunc(PC.Price,4),
Trunc(PC.Price,4),
PC.Waehrung,
If (((DC.Gueltigab is Null) or (DC.Gueltigab < PC.Gueltigab)) then
     PC.Gueltigab else DC.Gueltigab) as Gueltigab,
PC.blMatched,
Trunc(PC.Price2,4),
Trunc(PC.Price2,4),
Trunc(PC.Price3,4),
Trunc(PC.Price3,4),
PC.Bill_Intervall1,
PC.Bill_Intervall2,
PC.Info1,
PC.Info2,
PC.Info3
From "PrcPrices_81" PC left outer join "PrcDialcode_81" DC
on (PC.Destination = DC.Destination)
WHERE
 COALESCE(PC.Status,0) <> 4 AND Destination='NIGER'
JOINOPTIMIZECOSTS;



Comments Comments
The issue was with certain floating-point values and how the internal Delphi Trunc function worked with these values. In certain cases, it was possible for values that contained accumulated floating-point rounding errors to end up being truncated to a different value than what would be expected.


Resolution Resolution
Fixed Problem on 11/29/2012 in version 2.11 build 3


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image