VHG-IT
Mar 20, 2024Copper Contributor
Question about the CEILING function (Transact-SQL)
Hello,
Why do I get a different result for certain tens if I multiply them as INT or FLOAT value by 1.1 and apply CEILING to the operation?
DECLARE @A int = 40, @B float = 40;
SELECT CEILING(@A * 1.1), CEILING(@B*1.1);
Results:
44 44
DECLARE @A int = 50, @B float = 50;
SELECT CEILING(@A * 1.1), CEILING(@B*1.1);
Results:
55 56
DECLARE @A int = 60, @B float = 60;
SELECT CEILING(@A * 1.1), CEILING(@B*1.1);
Results:
66 66
I don't understand why with 50 as float the result is 56...