Floating point unit

from Wikipedia, the free encyclopedia
80287, FPU of an 80286 CPU with 6 MHz.

Floating point unit , FPU (for Floating Point Unit ) or NPU (for Numeric Processing Unit ) are terms from computer technology and denote a special processor that performs operations on floating point numbers . Since, in particular with older, microcode- based systems, in addition to comparatively simple operations such as addition, subtraction, multiplication, division or root extraction, transcendent functions such as the exponential function or various trigonometric functions were implemented in hardware, one also speaks of mathematical coprocessors .


The FPU can also sit as an external chip in its own housing (e.g. Intel 80287) or be integrated in a specific area within the CPU (e.g. Intel Pentium).

Early CISC - processors usually missing registers and commands to handle floating point numbers. Such calculations and mathematical functions were carried out via software library calls by the main processor, which was optimized for integer processing. In order to relieve the CPU of these computationally intensive tasks, there were initially arithmetic processors such as the AMD AM9511, which were addressed as peripheral components. With later CISC CPUs such as the Intel x86 processors (up to 486 ) or the Motorola 68k CPUs, there was the option of retrofitting an additional coprocessor on the motherboard .

The age of integrated FPUs was heralded by several factors:

  • Caches built into CPUs are incompatible with external FPUs. Intel's last stand-alone floating point unit, the i487 external coprocessor , was therefore actually a modified full 80486DX CPU. In contrast to the 80486SX, this had a built-in floating point unit. The modification of the coprocessor consisted of an additional control pin and an artificial lock that prevented its own operation. If the coprocessor was used, the SX CPU was deactivated.
  • Mathematical functions were increasingly used in "normal" applications, e.g. B. in rendering fonts.
  • Gate functions became increasingly cheaper, sockets and connectors more expensive.

Function and structure

Architecture of the FPU i8087 or i80287.

The presence of an FPU enables a significant increase in performance for floating point intensive calculations. For example, coprocessors offered wider registers: Even with 16- and 32-bit CPUs, the FPU often had 64-bit, 80-bit or 128-bit wide registers. As a result, simple calculations could be carried out with greater accuracy and a larger range of values ​​was covered. Since the inside of the FPU is ultimately also a digital processing unit, further, tricky methods are required in order to achieve real acceleration. Many models (e.g. the 8087 ) have calculation methods optimized on the hardware side, such as B. the CORDIC algorithm for trigonometric functions, which only works with addition and register shift, but without lengthy multiplication. Often a great acceleration is also achieved with permanently implemented lookup tables . This means that the values ​​are not determined by running the loop several times , but are first approximated with the help of tables and then determined with sufficient accuracy using interpolation methods (an error in such a table was the cause of the so-called Pentium bug ). Furthermore, an FPU can often organize its registers as a matrix and thus accelerate vector calculations.

Most FPUs provide operations for the basic arithmetic operations (with higher accuracy than the CPU), logarithm , square root and power calculation and trigonometric functions , as well as functions for calculating with matrices.

The computing power of an FPU is mostly measured in SPECfp , in contrast to the SPECint of a CPU.

See also

Individual evidence

  1. Dictionary.com - Intel 487SX ( Memento from March 16, 2012 in the Internet Archive )

Web links