Experimental Physics and Industrial Control System
|
Hi Andrew,
I think the part "value >= 0" works.
The add/substract of 0.5 before or after checking is a question of
taste. In my proposal, 0.5 would be needed only once and after the "if"
only the cast is to do.
The part "value < 0":
The test "value > (0.5 - 0x80000000)" means "value > (0.5 -
(-2147483648)" == "value > +2147483648.5" if 0x80000000 is interpreted
as 32-Bit long constant. If long is 64 bit on this system, the test is
"value > (-2147483647.5)", which is OK.
If you write "value > (0.5 - 0x80000000LU)" this should work always.
Why did you change the type of ROFF? Since value is double when ROFF is
substracted it doesn't cause problems even if ROFF is <0, I think.
What do you think of defining constants like "epicsInt32_MAX" and
"..MIN" in epicsTypes.h?
Bernd
- Replies:
- Re: ao record convert overflow Schoeneburg, Bernd
- References:
- ao record convert overflow Schoeneburg, Bernd
- Re: ao record convert overflow Andrew Johnson
- Navigate by Date:
- Prev:
Jenkins build is back to stable : epics-base-3.14-mac #41 APS Jenkins
- Next:
Re: ao record convert overflow Schoeneburg, Bernd
- 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: ao record convert overflow Andrew Johnson
- Next:
Re: ao record convert overflow Schoeneburg, Bernd
- 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, 16 Dec 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|