Experimental Physics and Industrial Control System
Hello all,
I was implementing some calculations with calcout records and
faced the following problem: with certain input values, the
result from the formula is NAN (not a number.) However, there
is no indication from the record itself that something is wrong.
(medm can display an INF but does not react to NAN.)
I would like to be able to raise an alarm (INVALID) if the result
from the calculation is NAN (at least, and maybe also for INF).
A quick try to modify the return from calcPerform
(libCom/calc/calPerform.c)so that
instead of (line 514)
return(0);
I made a simple check:
return(isnan(*presult));
and that seemed to give the effect that I wanted.
Does this look like a reasonable thing to do?
Timo
--
Timo Korhonen PSI (Paul Scherrer Institut), SLS
CH-5232 Villigen PSI
tel + 41- 56 3103262 fax + 41 - 56 310 3151
e-mail:
[email protected]
- Replies:
- Re: calc/calcout and NAN Marty Kraimer
- Navigate by Date:
- Prev:
Re: seq 1.9.4 Marty Kraimer
- Next:
Re: calc/calcout and NAN Marty Kraimer
- 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: seq 1.9.4 Ned Arnold
- Next:
Re: calc/calcout and NAN Marty Kraimer
- 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