Commit 376196fe authored by Lynn Garren's avatar Lynn Garren
Browse files

fix

parent d9645312
// -*- C++ -*-
// $Id: AnalyticConvolution.cc,v 1.7 2010/07/22 21:50:53 garren Exp $
// $Id: AnalyticConvolution.cc,v 1.8 2010/07/22 21:55:10 garren Exp $
#include "CLHEP/GenericFunctions/AnalyticConvolution.hh"
#include "CLHEP/GenericFunctions/Gaussian.hh"
#include "CLHEP/GenericFunctions/Exponential.hh"
#include <cmath> // for isfinite
#if (defined __STRICT_ANSI__) || (defined _WIN32)
#if (defined _WIN32)
#include <float.h> // Visual C++ _finite
#endif
namespace Genfun {
......@@ -77,7 +77,7 @@ double AnalyticConvolution::operator() (double argument) const {
if (_type==SMEARED_NEG_EXP) {
expG = exp((sigma*sigma +2*tau*(/*offset*/x))/(2.0*tau*tau)) *
erfc((sigma*sigma+tau*(/*offset*/x))/(sqrtTwo*sigma*tau))/(2.0*tau);
#if (defined __STRICT_ANSI__) || (defined _WIN32)
#if (defined _WIN32)
if (!_finite(expG)) {
expG=0.0;
}
......@@ -95,7 +95,7 @@ double AnalyticConvolution::operator() (double argument) const {
// Both sign distribution=> return smeared exponential:
if (_type==SMEARED_EXP) {
#if (defined __STRICT_ANSI__) || (defined _WIN32)
#if (defined _WIN32)
if (!_finite(expG)) {
expG=0.0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment