记住,整形数运算要比浮点数运算快得多,因为处理器可以直接进行整型数运算,浮点数运算需要依赖于外部的浮点数处理器或者浮点数数学库。
Remember, integer arithmetic is much faster than floating-point arithmetic, as it can usually be done directly by the processor, rather than relying on external FPUs or floating point math libraries.
对于财务应用程序(尤其是需要精确到最后一位的会计应用程序),处理浮点数和双精度数时也需要格外小心。
Financial applications (and especially accounting applications that require accuracy to the last cent) also need to be exceedingly careful when manipulating floats and doubles.
要修复此问题,用户可下载上述版本的漏洞补丁,或是为处理浮点数使用额外标志重编译 PHP 程序。
To fix the problem, users can download patches for those versions or recompile PHP with additional flags for handling floating point digits.
So what that means is the compiler is actually going to first "cast" so to speak 13 from whatever it is - to a float -- to a floating point value -- and then perform the division for us.
所以这里的意思是编译器将,做“计算“,譬如13这样一个浮点数,-到另一个浮点数-,然后为我们处理除法。
Last thing to say is why would you want to have exceptions? Well, let's go back to that case of inputting a simple little floating point.
最后要讲的是为什么有异常处理?,回到输入一个简单的小浮点数的例子,如果我期望主要是。
Ah ha, it goes into that accept portion, prints out a message, and goes back around the while loop to say try again. And it's going to keep doing this until I give it something that does serve as a float.
他会说输入一个浮点数,啊哈,它就到了那段处理代码,打印出消息,然后回到while循环让我们再输一次,它会持续这么做直到它接受到一个浮点数。
应用推荐