Dear community,
I am using a Xilinx ZCU106 with an ARM Cortex R5 cpu together with FreeRTOS.
I need your assistance regarding the casting issue from “long” to “double” in a C code application within the FREERTOS environment.
I have attached 3 pictures to illustrate the problem:
- ellipse0_ok.PNG: Correct calculation of the value “ellipse0,” resulting in 1695208.
- ellipse1_WrongCastingToDouble.PNG: Incorrect result of the value “ellipse1” (4.08714728854E-313) after casting from long to double.
- assemblyCodeEllipse0toEllipse1.PNG: Assembly code snippet for potential insights into the problem’s root cause.
The casting problem from double to long intermittently occurs, and I suspect it might be related to the processor itself. I’m wondering if there is any ERRATA or known issue concerning the processor’s casting to double. This problem is causing significant disruptions, and we are struggling to debug it effectively or identify the specific factors contributing to it.
Thank you for your response and support.
Best regards,