Reported By: Christoph Ertl Reported On: 6/27/2003 For: Version 3.20 Build 1
# 1372ROUND() SQL and Filter Function Causes Improper Results Rounding function within a SQL statement is buggy.
SELECT round( 35.25 TO 1),
round( 35.15 TO 1)
FROM AnyTableYouWant
returns [35.3, 35.1]
Comments and WorkaroundsThe only way to solve this rounding issue is to cast the constants as Decimal(0,2), since this is a floating-point issue caused by the internal base-2 structure of floating-point numbers.