Why does the calculator calculate incorrectly?

Update Time: 2024-02-01 11:05:53

1. The results are different due to different calculation logic, such as 100+50%=150 or 100+50%=100.5. In earlier versions of the calculator, the percentage calculation logic was "x+y%=x+y/100", "x-y%=x-y/100". Subsequent versions of the calculator optimize the calculation logic to "x+y%=(1+y%)x", "x-y%=(1-y%)x". 100+50%=150 or 100-50%=50 is normal.

If you want the calculation logic of 100+50% = 100.5 before optimization, you can enter 100 + (50%), so the calculated result is equal to 100.5.

calculator calculate incorrectlycalculator wrong answer


2. Differences due to different algorithms (single-precision floating-point numbers and double-precision floating-point numbers). The calculator algorithm that comes with the mobile phone is a single-precision floating-point number, which only supports 32 bits. When the number is converted into computer code, if it exceeds 32 digits, there will be rounding, which will lead to inaccurate calculation. At this time, it is recommended that you download third-party calculator software for use.


Thanks for your feedback
Please tell us how to help you better
0/300
Didn't find what you were looking for? Please contact us
Choose your market
Products may have different prices and availability based on market
Asia-Pacific
Europe
Middle East and Africa
Latin America
Other Regions