Fix rounding of fixed-point constants where fractional digits should carry into integer part (#2088)

This commit is contained in:
Rangi
2026-09-14 13:52:39 -04:00
committed by GitHub
parent 7746ddbf2b
commit d082f24a2d
5 changed files with 48 additions and 7 deletions
+17
View File
@@ -0,0 +1,17 @@
opt Q8
println strfmt("%f", 1.999)
println strfmt("%f", 2.999)
println strfmt("%f", 3.999)
println strfmt("%f", 16777215.999)
opt Q16
println strfmt("%f", 1.999999)
println strfmt("%f", 2.999999)
println strfmt("%f", 3.999999)
println strfmt("%f", 65535.999999)
opt Q24
println strfmt("%f", 1.999999999)
println strfmt("%f", 2.999999999)
println strfmt("%f", 3.999999999)
println strfmt("%f", 255.999999999)