This also happens in 26.3.
Steps to Reproduce:
Run: /compute default float {type:"constant",value:2} 0.5
Run: /compute default float {type:"constant",value:2.5} 2
Observed Results:
Number provider returned value 2.0 (rounded to 1)
Number provider returned value 2.5 (rounded to 5)
Expected Results:
2 x 0.5 = 1 and 2.5 x 2 = 5 are exact, so the exact message should be shown, for example "Number provider returned
value 1".
Code analysis:
ComputeCommand#computeAsFloat calculates result = Mth.floor(original * scale) but then checks if (result == original),
comparing against the unscaled value. It also passes original instead of original * scale to the rounded message.
Comments 0
No comments.