0

How come when I run this code, I get an output of 0.21000000000000002 instead of 0.21?

BEGIN
    DECLARE S1 REAL;
    DECLARE S2 REAL;
    DECLARE Srainfall REAL;
    SET S1 = .04;
    SET S2 = .17;
    SET Srainfall = S1 + S2;
    Insert into Statistical_info(City_id, Total_Rain_fall)
    values(ID, Srainfall);
END
Red Dragon
  • 43
  • 6

0 Answers0