Experimental Physics and
| |||||||||||||||
|
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]
| ||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |