A floatingpoint unit (FPU, colloquially a math coprocessor) is a part of a computer system specially designed to carry out operations on floating point numbers. Typical operations are addition, subtraction, multiplication, division, and square root. Some systems (particularly older, microcodebased architectures) can also perform various transcendental functions such as exponential or trigonometric calculations, though in most modern processors these are done with software library routines.
In most modern general purpose computer architectures, one or more FPUs are integrated with the CPU; however many embedded processors, especially older designs, do not have hardware support for floatingpoint operations.
In the past, some systems have implemented floating point via a coprocessor rather than as an integrated unit; in the microcomputer era, this was generally a single integrated circuit, while in older systems it could be an entire circuit board or a cabinet.
Not all computer architectures have a hardware FPU. In the absence of an FPU, many FPU functions can be emulated, which saves the added hardware cost of an FPU but is significantly slower. Emulation can be implemented on any of several levels: in the CPU as microcode, as an operating system function, or in user space code.
In most modern computer architectures, there is some division of floatingpoint operations from integer operations. This division varies significantly by architecture; some, like the Intel x86 have dedicated floatingpoint registers, while some take it as far as independent clocking schemes.
Floatingpoint operations are often pipelined. In earlier superscalar architectures without general outoforder execution, floatingpoint operations were sometimes pipelined separately from integer operations. Since the early and mid1990s, many microprocessors for desktops and servers have more than one FPU.
When a CPU is executing a program that calls for a floatingpoint operation, there are three ways to carry it out:
 A floatingpoint unit emulator (a floatingpoint library)
 Addon FPU
 Integrated FPU
Contents
Floatingpoint library
Some floatingpoint hardware only supports the simplest operationsâ€”addition, subtraction, and multiplication. But even the most complex floatingpoint hardware has a finite number of operations it can supportâ€”for example, none of them directly support arbitraryprecision arithmetic.
Full article ▸
