atan (double) accuracy is about the same as atanf (float)
On a STM32F407, using atan (double) and launchpad with hard floating pt, the accuracy is about the same as atanf (float), and of course much slower. Using CodeSourcery and soft fp the accuracy for atan is the same as when I compare to the results on the PC with gnu C.
For example--
atan(0.15)
0.1488899476094
0.14888994760950 STM32 CodeSourcery & soft fp
0.14888994433051 STM32 launchpad & hard fp
atanf(.15)
0.14888995 STM32 launchpad & hard fp
This suggests something is limiting the precision for trig routines when doubles are being used. What is behind the low accuracy for the atan (double)? Are the double trig routines for hard fp using floats?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Donald Haselwood for more information if necessary.