If I remember my math classes correctly 1% - 1% = 0.0099. That is becuase it can be written also as 0.01 − 0.0001.
More obvious it si in this example 5 - 1% = 4.95 and 5 - 100% = 0. So 1% - 100% = 0 because we are substacting the whole (i.e. 100%) number from the number.
Same as for subtraction applies to multiplication, 1% * 1% can be aslo written as 0.01 * 0.0001..
Not sure if this has anything to do with calculators or computer scinence at all.
Just very basic math principles and rules how % calculations work.
Yes, I agree! But some calculators, like KCalc, still produce 0 in cases like this. I noticed it myself on Manjaro Linux. Likely a quirk in how they handle percentages rather than basic math principles. 😊
Oh, I see. That is quite interesting.
I have recently discovered that lots of stuff in Windows 11 is done using React Native. So we may be lucky not havig 0.1 + 0.2 = 0.30000000000000004, hahaha.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If I remember my math classes correctly 1% - 1% = 0.0099. That is becuase it can be written also as 0.01 − 0.0001.
More obvious it si in this example 5 - 1% = 4.95 and 5 - 100% = 0. So 1% - 100% = 0 because we are substacting the whole (i.e. 100%) number from the number.
Same as for subtraction applies to multiplication, 1% * 1% can be aslo written as 0.01 * 0.0001..
Not sure if this has anything to do with calculators or computer scinence at all.
Just very basic math principles and rules how % calculations work.
Yes, I agree! But some calculators, like KCalc, still produce
0
in cases like this. I noticed it myself on Manjaro Linux. Likely a quirk in how they handle percentages rather than basic math principles. 😊Oh, I see. That is quite interesting.
I have recently discovered that lots of stuff in Windows 11 is done using React Native. So we may be lucky not havig 0.1 + 0.2 = 0.30000000000000004, hahaha.