In computing, floating-point1) is a numerical-representation system in which a string of digits (or bits) representsa real number. The most commonly encountered representation is that defined by the IEEE 754 Standard. The advantage of floating-point representation over fixed-point (and integer) representation is that it supports a much wider range of values. The speed of floating point operations is an important measure of performance for computers in many application domains. It is measured in mega-flops2)
The range of floating point numbers depends on the number of bits used for representation of the mantissa and exponent. On a typical 32 bit computer system (alse the FESTO SBOx-smartcamera), using double precision (64 bit) floating point—a mantissa of 52 bits, exponent of 11 bits and 1 sign bit—floating point numbers have an approximate range of 10−308 to 10308 (because 308 is approximately 1023 * log10(2), since the range of the exponent is [-1022,1023]).
Due to the fact the internal processor lacks a hardware FPU operations handling floating-point numbers are rather slow compared with pure integer-arithmetic. Nevertheless you are provided with a softloat (compiler generates subroutine calls for each calculation) toolchain that is highly optimised for handling floating-point numbers on your FESTO SBOx-smartcamera.
GNU-Hardfloat | GNU-Softfloat | Toolchain | Speedup Hard/Soft | |||||
---|---|---|---|---|---|---|---|---|
float | double | float | double | float | double | float | double | |
ADD/SUB | 0,317 | 0,244 | 3,263 | 1,885 | 8,594 | 5,920 | 27/2,60 | 24/3,14 |
MUL | 0,296 | 0,252 | 3,459 | 1,489 | 10,317 | 5,221 | 35/2,98 | 21/3,51 |
DIV | 0,250 | 0,156 | 0,595 | 0,295 | 5,503 | 3,229 | 22/9,24 | 21/10,9 |
SQRT | 0,013 | 0,013 | 0,382 | 0,333 | 6,359 | 3,542 | 489/16,6 | 272/10,6 |
The values above are in MFLOPS.