TONT 39193 无人关注的内在

请注意:本页内容发布于 2103 天前,内容可能已经过时,请注意甄别。

——人们都说真正的美都是内在的。

——随便你怎么说啦,你个死胖子。

原文链接:https://blogs.msdn.microsoft.com/oldnewthing/20040525-00/?p=39193

I find it ironic when people complain that Calc and Notepad haven’t changed. In fact, both programs have changed. (Notepad gained some additional menu and status bar options. Calc got a severe workover.)

每当人们说起『计算器』和『记事本』从来没有发生过变化时,我都感觉很讽刺。实际上,两个应用程序都有过变动。(记事本增加了一些菜单以及状态栏选项,计算器则从头到脚都进行了一番大修。)

I wouldn’t be surprised if these are the same people who complain, “Why does Microsoft spend all its effort on making Windows ‘look cool’? They should spend all their efforts on making technical improvements and just stop making visual improvements.”

如果是(讽刺计算器和记事本的外在从来没变过的)同一批人抱怨『为什么微软费那么大力气让Windows「看起来Cool」啊?他们就该把精力全部放在技术进步上,别再对视觉效果做些没什么卵用的改进了』的话,我是一点也不会觉得奇怪的。

And with Calc, that’s exactly what happened: Massive technical improvements. No visual improvement. And nobody noticed. In fact, the complaints just keep coming. “Look at Calc, same as it always was.”

对于计算器而言,后一种说法正是实际发生的事情:大量的技术进步,没有任何视觉上的变化。然后并没有什么人注意到这一点。实际上,类似的抱怨只是一直传来:『瞅瞅,这个计算器,跟以前完全一样嘛。』

The innards of Calc – the arithmetic engine – was completely thrown away and rewritten from scratch. The standard IEEE floating point library was replaced with an arbitrary-precision arithmetic library. This was done after people kept writing ha-ha articles about how Calc couldn’t do decimal arithmetic correctly, that for example computing 10.21 – 10.2 resulted in 0.0100000000000016.

计算器的核心——算数引擎——是整个从零开始重写过的,将标准的IEEE浮点运算库替换成了高精度算法库。这一改进是在人们写了太多嘲笑计算器连小数运算都做不对——例如,10.21减10.2的结果是0.0100000000000016——的文章之后进行的。

(These all came from people who didn’t understand how computers handle floating point. I have a future entry planned to go into floating point representations in more detail.)

(会发生这种情况,完全是因为人们无法理解计算机是如何处理浮点数所导致的。以后我会写一篇文章来详细讲一讲有关浮点数的事情。)

Today, Calc’s internal computations are done with infinite precision for basic operations (addition, subtraction, multiplication, division) and 32 digits of precision for advanced operations (square root, transcendental operators).

现在,计算器内部对于基本运算(加、减、乘、除)是用无限精度进行处理的,而对于高级运算(平方根、超越函数)使用的则是32位精度。

Try it: 1 / 3 * 10000000000 – 3333333333 =. The result is one third exactly. Type 1/x – 3 = and you get zero back. (Of course, if you don’t believe that, then repeat the sequence “* 10000000000 – 3333333333 =” until you’re bored and notice that the answer always comes back as 0.33333333333333333333333333333333. If it were fixed-precision, then the 3’s would eventually stop coming.)

可以试一下:(译注:以下操作需要在计算器的『科学型』下进行)1 / 3 * 10000000000 – 3333333333 =,结果是正好的三分之一。继续录入1/x(译注:科学型计算器上有单独的这个倒数键)-3=就会回到0。(当然,如果你不相信的话,可以继续按无数次* 10000000000 – 3333333333 = 按到烦为止,你会注意到答案总会是0.33333333333333333333333333333333。如果是固定精度的话,后面那一串3迟早会消失。)

Thirty-two positions of precision for inexact results not good enough? The Power Calculator PowerToy uses the same arithmetic engine as Calc and lets you crank the precision to an unimaginable 512 digits.

如果你觉得32位的精度还不够,那PowerToy套件里的Power Calculator用的是跟(Windows自带的)计算器一样的引擎,不过允许精度最高达到难以想象的512位。

Anyway, my point is that – whether you like it or not – if you don’t change the UI, nobody notices. That’s so much effort is spent on new UI.

总之,我的观点是:不管你喜不喜欢——如果不对UI进行变动,木有人会注意的到。在新UI上下的力气可真是大啊。

Comments

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

 剩余字数 ( Characters available )

Your comment will be available after auditing.
您的评论将在通过审核后显示。

Please DO NOT add any links in your comment, otherwise it would be identified as SPAM automatically and never be audited.
请不要在评论中插入任何链接,否则将被自动归类为垃圾评论,且永远不会被提交给博主进行复审。

*