unexpected rounding for int/float division
Open
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
When I evaluate the following expression, I get a result of "-0"
{ -1.0 * 5 / 1000 }
But when I instead simplify the first multiplication myself, I get the expected result of "-0.005"
{ -5.0 / 1000 }
As a workaround I figured out I can do the first multiplication and store the result in a temp variable, and then use that for the subsequent calculation, but it would be nice if it handled the math for me. Seems like it could introduce other mathematical bugs down the road. I'm using Inky version: 0.14.1
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.