On Jan 15, 2021, at 1:00 PM, Michael Davidsaver <
mdavidsaver at gmail.com> wrote:
On
1/15/21 10:49 AM, Johnson, Andrew N. via Core-talk wrote:
The above expected results were calculated by the compiler and are wrong, whereas the calc _expression_ is actually returning the right result.
From
a quick look at math.h with RTEMS 5.1 i386 (really newlib?)
the
INFINITY macro (used in epicsMath.cpp to initialize epicsINF)
should
expand to a __builtin_inff().
This might have something to do with the PowerPC e500 family, which uses a different set of FP instructions to the older PPC603/604/MPC750 CPU cores (maybe SPE2?). I remember reading that to properly support the full IEEE floating-point standard the OS
has to emulate certain operations. My guess is that RTEMS contains the correct code for doing that (which is why the calc engine is mostly getting the right answers), but the compiler isn’t being given the right flags to tell it to behave similarly.