Hi Mike,
On May 21, 2016, at 12:43 PM, Laznovsky Michael (PSI) <[email protected]> wrote:
>
> case ABS_VAL:
> if (*ptop < 0.0) *ptop = - *ptop;
> break;
>
> In my case, the CALC is "ABS(A*B)", and e.g. A=0 and B<0 results in ABS(-0), which does
> not satisfy the if() in the code because -0 is NOT less than zero, so the sign is not flipped
> back to positive.
>
> Using fabs() instead fixes it (and probably also saves a branch).
Interesting effect; I just committed your fabs() change to the 3.14 branch.
Thanks!
- Andrew
- References:
- ABS() in calc record Laznovsky Michael (PSI)
- Navigate by Date:
- Prev:
RE:How to disable sequencer output at startup? Touchard Dominique
- Next:
Re: How to disable sequencer output at startup? Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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: ABS() in calc record Laznovsky Michael (PSI)
- Next:
EPICS V4 Training at Lund Colaboration meeting david.hickin
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
|