From 8d68c85d8b5fe0471101933859f3dcd8d36f88e6 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 2 Apr 2009 21:38:07 +0000 Subject: [PATCH] Add epicsNAN and epicsINF to the osi section of libCom. --- src/libCom/osi/epicsMath.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/libCom/osi/epicsMath.cpp diff --git a/src/libCom/osi/epicsMath.cpp b/src/libCom/osi/epicsMath.cpp new file mode 100644 index 000000000..bfeda3412 --- /dev/null +++ b/src/libCom/osi/epicsMath.cpp @@ -0,0 +1,34 @@ +/*************************************************************************\ +* Copyright (c) 2002 The University of Chicago, as Operator of Argonne +* National Laboratory. +* Copyright (c) 2002 The Regents of the University of California, as +* Operator of Los Alamos National Laboratory. +* EPICS BASE Versions 3.13.7 +* and higher are distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. +\*************************************************************************/ +/* epicsMath.cpp */ + +#include +#include + +static float makeNAN ( void ) +{ + float a,b,c; + a = 0.0; + b = 0.0; + c = a / b; + return c; +} + +static float makeINF ( void ) +{ + float a,b,c; + a = 1.0; + b = 0.0; + c = a / b; + return c; +} + +epicsShareDef float epicsNAN = makeNAN(); +epicsShareDef float epicsINF = makeINF();