Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How floats are computed on a machine without an FPU

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?

like image 501
abhithakur88 Avatar asked Nov 30 '22 15:11

abhithakur88


1 Answers

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.

like image 170
wallyk Avatar answered Dec 05 '22 03:12

wallyk