2020-09-14 05:43 AM
2020-09-14 05:49 AM - edited 2024-11-05 02:42 PM
Dont recall it supporting 'long double' you'd need to check the math libraries.
The regular 'double' is done in software.
2020-09-14 05:51 AM
Yes, but it will be done in software and be very slow.
"double" is 64-bit, "long double" is the same.
2020-09-14 05:58 AM
Can you please rephrase "done in software" as my calculations are critical and i need up to 10+ decimal places accuracy
For example with float it gives result after some calculation like "78.5849684125" but its wrong it should be 78.584965876.
2020-09-14 06:02 AM
Can you please rephrase "done if software" as my calculations are critical and i need up to 10+ decimal places accuracy
For example with float it gives result after some calculation like "78.5849684125" but its wrong it should be 78.584965876.And i have to pass these values from STM32 to FPGA
2020-09-14 06:11 AM
Instead of using an FPU unit which can do the calculation in a few instruction cycles, it is emulated in software and takes way way more instructions.
Float has about 6 places of precision.
2020-09-14 06:15 AM
Uses software libraries rather than using the FPU hardware. The software describing a sequence of steps to perform the math on exponent and mantissa values, and normalize on completion.
Also unlike Intel and Motorola FPU from the past, the ARM implementation does NOT hold intermediate computations at a higher precision.
You might have to be more aware of your algorithm and math order to maintain optimal precision.
PC and ARM based computations may differ slightly based on intermediate precision loss. As with all floating point, precision is lost as the size of the number increases. Large numbers have the least precision.