EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: NaN and analog records
From: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Tue, 4 Nov 2014 14:17:45 +0100
On Tuesday 04 November 2014 13:41:00 Ralph Lange wrote:
> Hello Götz,
>
> On 04/11/2014 13:32, Goetz Pfeiffer wrote:
> > another problem is that DRVL and DRVH seem to be ignored for NaN.
> >
> > The following record;
> >
> > record(ao,"UE56ID3R:BaseParGapTrs") {
> >
> >      field(ASG,"USERCTL")
> >      field(DRVH,"0.1")
> >      field(DRVL,"0")
> >      field(LINR,"NO CONVERSION")
> >      field(OIF,"Full")
> >      field(PREC,"4")
> >
> > }
> >
> > for example can be set to NaN (at least for Epics Base 3.14.8).
>
> Comparisons between numbers and non-numbers (such as NaN) are
> undefined.

I am quite sure neither the C standard(s) nor IEEE 754 say this is
undefined. Rather, IIRC, comparisons involving NaN always result in a
FALSE value, including the test for equality of a variable with itself.

> What is your suggestion on how to check limits for a
> non-number without using comparisons?

The more interesting question is: what should the resulting VAL be, if
not NaN?

Cheers
Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


References:
NaN and analog records Benjamin Franksen
Re: NaN and analog records Goetz Pfeiffer
Re: NaN and analog records Ralph Lange

Navigate by Date:
Prev: Re: NaN and analog records Goetz Pfeiffer
Next: Re: NaN and analog records Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: NaN and analog records Goetz Pfeiffer
Next: RE: NaN and analog records michael.abbott
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·