By default, VDSP that the two types are the same, so we compare long double and float.
1.1 Type representation
The following are two types of data representations:
  |
float |
long double |
number of bytes |
8 |
symbol bit |
1 |
1 |
TD style= "BORDER:0;PADDING:0;" > exponential number of digits
11 |
number of digits |
52 |
minimum |
1.1754943508222875e-38f |
|
Max |
3.4028234663852886e+ 38F |
resolution |
1.1920928955078125e-07f |
|
1.2 Operational efficiency under normal conditions
The following table gives the efficiency comparison of two types of operations, select High Performance
|
Float |
Long double |
Add and subtract operation |
132 Cycle |
166 Cycle |
Multiplication operations |
Cycle |
179 cycle |
Division operations |
Cycle |
1506 Cycle |
Khan, this long double is too harsh for division!
The following table gives an efficiency comparison of two types of operations, choosing strict IEEE:
|
Float |
Long double |
Add and subtract operation |
310 Cycle |
381 Cycle |
Multiplication operations |
274 cycle |
585 Cycle |
Division operations |
497 cycle |
1063 cycle |
There's a value here that seems odd, and after choosing the strict IEEE option, long double makes division faster!
This explains the two different options in VDSP's documentation:
THE-FAST-FP (fast floating point) switch directs the compiler to link with the high-speed floating-point emulation librar Y. This library relaxes some of the IEEE floating-point Standard's rules for checking inputs against Not-a-number (NaN) A D denormalized numbers to improve performance. This switch was enabled by default.
THE-IEEE-FP (slower floating point) switch directs the compiler to link with the fully-compliant floating-point Library. This library obeys all of the IEEE floating-point Standard's rules, and incurs a performance penalty when compared with th E default floating-point emulation library.
're told all computations should be slower after using the strict IEEE option, but a long double floating-point division seems to be an exception!