Floating-point operation means that the result is a floating-point number, and the decimal part of the calculation result will be retained. Although floating-point operation can run in a large numerical range, its representation is only approximate. Because computers can only store integers and real numbers are divisors, floating-point operations are slow and have errors.
CPU central processing unit adopts integer operation. In scientific calculation, the CPU can speed up the operation and improve the efficiency of system execution through integer operation.
In most cases, floating-point operation is used by CPU to assist the processor to complete the processing work that the central processor can't perform or is inefficient and ineffective.
Extended data:
Because floating-point operation is suitable for any operation between two numbers, it requires a lot of resources. On the processor without FPU, all these operations are completed by software through the C compiler library, which is invisible to programmers. But the performance is very low. On the processor with FPU, for most instructions, all operations are completed by hardware in one cycle.
C compiler does not use its own floating-point library, but directly generates FPU native instructions. When executing mathematical algorithms on processors with FPU, programmers do not have to choose between performance and development time. With FPU, you can use any generated code directly and reliably through advanced tools such as matlab or scilab, while ensuring performance.