When do you use fp:strict as opposed to fp:precise? Is it better to use the former if I want "more precise" calculations and avoid rounding errors? What is the heuristic behind using either?
The standard IEEE 754 specifies a method for floating point calculations and storage of floating point values in memory.
Using fp:strict
means that all the rules of IEEE 754 are respected. fp:strict
is used to sustain bitwise compatibility between different compilers and platforms.
fp:precise
weakens some of the rules, however it warranties that the precision of the calculations will not be lost.
fp:fast
allows compiler specific optimizations and transformations of expressions containing floating point calculation. It is the fastest methods but the results will differ between different compilers and platforms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With