create account

BUG还是Feature? 计算器计算(10% + 10% =?) by oflyhigh

View this thread on: hive.blogpeakd.comecency.com
· @oflyhigh ·
$24.37
BUG还是Feature? 计算器计算(10% + 10% =?)
前些天看到一个消息,说是使用手机计算器,计算`10% + 10%`结果等于`0.11`,第一感觉是不信,结果调出我三星手机的计算器一算,果然是这个结果。

![](https://cdn.steemitimages.com/DQmUrq38cMcLrxntFmWXHWExq7prUbrtJtRYCtCRfyapr6h/image.png)
(使用bing.com上网页计算器算出来的结果)

然后用其它手机测试了一下,我手头有的手机,都是这样。`10% + 10%`不应该等于`0.2`吗?这个问题想必上小学的小朋友都能轻易算出,为啥计算器算出来的却是`0.11`呢?到底发生了什么事情?

![](https://cdn.steemitimages.com/DQmP7VKUe2x5wrxJv4gmvTSn3dQiH8bvDgE1ZBLmZthiqeL/image.png)
(使用Google上网页计算器算出来的结果)

测试了一下,计算器计算的结果不止影响`10% + 10%`,所有和百分比有关的加减法都受影响,比如说:

***`20% + 20%`***
>![](https://cdn.steemitimages.com/DQmfB8pvPCFPq3Do968NHN3ru41SwFAc2vDTNJ5EX9TCtTc/image.png)


***`10% - 10%`***
![](https://cdn.steemitimages.com/DQmcLmshVii9YbgrQPJH6f9sPxcAAMuoWQx9mnQ2Czfz66x/image.png)

***`10 + 10%`***
![](https://cdn.steemitimages.com/DQmaRR8HaZDWgeaktw8yE4Et6zPH76bjKFgvKL7ou4SFVDM/image.png)

找了一些文章,据说在计算器中,`%`这个功能最初源于计算小费等等,比如一段饭花费100元,加上10%的小费,那么用计算器来算就是`100+10% = 110`。

也就是说,在计算器进行运算时,自动对上述算式进行了补充,***计算`A + B%`会被补充为`A + A * B%`***。`100+10% `变成了`100+100 * 10%`所以就等于`110`啦。

感兴趣的小伙伴可以用计算器验证一下`100+100 * 10%`,看看是不是正常?

不过,或许这个功能在国外生活场景中非常实用,但是我觉得还是该是多少就是多少比较好,按数字/数学应该的样子来。

另外一个有意思的事是,百度的计算器不存在这个问题。
>![](https://cdn.steemitimages.com/DQmV5aXri41Rgm68RDjeBQECWw8EJzNU7nD53XNuFLnrv8q/image.png)

我不确定百度的网页计算器是不是一直都这样,如果是在`10% + 10%`被广泛讨论之前就这样,那么就值得为百度点赞喽。


----
<center><strong>Vote For Me As Witness</strong>
https://steemit.com/~witnesses type in **`oflyhigh`** and click ***`VOTE`***
[![](https://cdn.steemitimages.com/DQmX5NysqT44FBa3bhuWqQ69nAbseu8Nt5YQPn2pYejPVxA/image.png)](https://steemit.com/~witnesses)
[Vote @oflyhigh via Steemconnect](https://steemconnect.com/sign/account-witness-vote?witness=oflyhigh&approve=1)
<strong>Thank you!</strong></center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 121 others
properties (23)
authoroflyhigh
permlinkbug-feature-10-10
categorycn
json_metadata{"tags":["cn","bug","feature","calculator"],"image":["https://cdn.steemitimages.com/DQmUrq38cMcLrxntFmWXHWExq7prUbrtJtRYCtCRfyapr6h/image.png","https://cdn.steemitimages.com/DQmP7VKUe2x5wrxJv4gmvTSn3dQiH8bvDgE1ZBLmZthiqeL/image.png","https://cdn.steemitimages.com/DQmfB8pvPCFPq3Do968NHN3ru41SwFAc2vDTNJ5EX9TCtTc/image.png","https://cdn.steemitimages.com/DQmcLmshVii9YbgrQPJH6f9sPxcAAMuoWQx9mnQ2Czfz66x/image.png","https://cdn.steemitimages.com/DQmaRR8HaZDWgeaktw8yE4Et6zPH76bjKFgvKL7ou4SFVDM/image.png","https://cdn.steemitimages.com/DQmV5aXri41Rgm68RDjeBQECWw8EJzNU7nD53XNuFLnrv8q/image.png","https://cdn.steemitimages.com/DQmX5NysqT44FBa3bhuWqQ69nAbseu8Nt5YQPn2pYejPVxA/image.png"],"links":["https://steemit.com/~witnesses","https://steemconnect.com/sign/account-witness-vote?witness=oflyhigh&approve=1"],"app":"steemit/0.1","format":"markdown"}
created2019-09-09 00:40:03
last_update2019-09-09 00:40:03
depth0
children2
last_payout2019-09-16 00:40:03
cashout_time1969-12-31 23:59:59
total_payout_value12.265 HBD
curator_payout_value12.107 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,678
author_reputation6,451,418,168,402,493
root_title"BUG还是Feature? 计算器计算(10% + 10% =?)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,391,368
net_rshares59,536,524,786,331
author_curate_reward""
vote details (185)
@partiko ·
Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.01% upvote! Together, let’s change the world!
properties (22)
authorpartiko
permlinkre-bug-feature-10-10-20190909t013012
categorycn
json_metadata"{"app": "partiko"}"
created2019-09-09 01:30:15
last_update2019-09-09 01:30:15
depth1
children0
last_payout2019-09-16 01:30:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length213
author_reputation39,207,160,334,751
root_title"BUG还是Feature? 计算器计算(10% + 10% =?)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,392,109
net_rshares0
@wongshiying ·
我觉得是计算机的编译问题吧。

Posted using [Partiko Android](https://partiko.app/referral/wongshiying)
properties (22)
authorwongshiying
permlinkwongshiying-re-oflyhigh-bug-feature-10-10-20190909t023151093z
categorycn
json_metadata{"app":"partiko","client":"android"}
created2019-09-09 02:31:51
last_update2019-09-09 02:31:51
depth1
children0
last_payout2019-09-16 02:31:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length88
author_reputation19,237,686,670,272
root_title"BUG还是Feature? 计算器计算(10% + 10% =?)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,393,220
net_rshares0