Experimental Physics and Industrial Control System
|
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.
It
might be worth making sure this is used. (as opposed to
our
makeINF() in epicsMathc.cpp) Also to see what the
builtin
really is expanding to for this powerpc target.
Agreed, those makeINF() and makeNAN() functions are really only provided there as a last-resort, in most cases the OS-specific epicsMath.h should be making sure that INFINITY and NAN are properly defined from the platform-specific headers.
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|
- Replies:
- Re: Arithmetic - test with qoriq Ralph Lange via Core-talk
- References:
- Arithmetic - test with qoriq Heinz Junkes via Core-talk
- Re: Arithmetic - test with qoriq Johnson, Andrew N. via Core-talk
- Re: Arithmetic - test with qoriq Michael Davidsaver via Core-talk
- Navigate by Date:
- Prev:
Re: Arithmetic - test with qoriq Michael Davidsaver via Core-talk
- Next:
Build failed: EPICS Base 7 base-7.0-125 AppVeyor via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Arithmetic - test with qoriq Michael Davidsaver via Core-talk
- Next:
Re: Arithmetic - test with qoriq Ralph Lange via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|
ANJ, 18 Jan 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|