Files
epics-base/modules/libcom/src/osi/epicsMath.cpp
T
Andrew Johnson 3c99391d93 Added SPDX License ID to all EPICS-original source files
In some cases the license-identification header was missing,
so I added that as well. Replaced the remaining headers that
specifically identified "Versions 3.13.7 and higher".

Makefiles and the build system were deliberately excluded.
2020-08-03 11:53:01 -05:00

44 lines
888 B
C++

/*************************************************************************\
* Copyright (c) 2010 UChicago Argonna LLC, as Operator of Argonne
* National Laboratory.
* SPDX-License-Identifier: EPICS
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* epicsMath.cpp */
#include <epicsMath.h>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4723)
#endif
#ifndef NAN
static float makeNAN ( void )
{
float a = 0, b = 0;
return a / b;
}
#define NAN makeNAN()
#endif
#ifndef INFINITY
static float makeINF ( void )
{
float a = 1, b = 0;
return a / b;
}
#define INFINITY makeINF()
#endif
extern "C" {
float epicsNAN = NAN;
float epicsINF = INFINITY;
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif