如何在没有FPU的机器上计算浮点数 [英] How floats are computed on a machine without an FPU
问题描述
float
。有些机器有一个浮点处理器,执行所有的浮点运算。我的问题是:有没有一个浮点处理器的机器?这样的机器如何使用浮点数?许多小型控制器没有浮点单元。在这种情况下,有一个浮点软件库。
在20世纪80年代中期,我们认为自己有福了,如果我们的系统有一个8087,FPU为8086和8088.不幸的是,如果8087存在或不存在,我们的软件必须正常工作。这意味着陷阱和模拟8087指示,如果它是失踪。
C language has a data-type float
. Some machines have a floating point processor that carries out all the floating point computations. My question is: Could there be some machines without a floating point processor? How do such machines use floating point?
Many small controllers do not have floating point units. In that case, there is a floating point software library.
In the mid-1980s, we considered ourselves blessed if our system had an 8087, the FPU for the 8086 and 8088. Unfortunately our software had to work correctly if an 8087 was present or not. That meant trapping and emulating 8087 instructions if it was missing.
这篇关于如何在没有FPU的机器上计算浮点数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!