From 81f8a53d2c0ec948f9396fc58be0328b502392c4 Mon Sep 17 00:00:00 2001 From: W. Trevor King Date: Tue, 21 Oct 2008 10:28:29 -0400 Subject: [PATCH] changed abs(double) to fabs(double) in fs_fit_spectrum.cpp Also added math.h include to fs_select_tree.cpp --- src/fs_fit_spectrum.cpp | 4 ++-- src/fs_select_tree.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fs_fit_spectrum.cpp b/src/fs_fit_spectrum.cpp index 6c04d7b..1e295b8 100644 --- a/src/fs_fit_spectrum.cpp +++ b/src/fs_fit_spectrum.cpp @@ -572,7 +572,7 @@ void fs_fit::Spectrum::adjustZeroTSS() throw (fs_fitFitException) if (tss > high_tss) throw fs_fitFitException("contact point not found","cp_not_found"); - if (abs(force) < range) + if (fabs(force) < range) { if (!first) { first = true; first_idx = i; } n++; @@ -597,7 +597,7 @@ void fs_fit::Spectrum::adjustZeroTSS() throw (fs_fitFitException) const double tss = gsl_vector_get(data->rawtss, i); const double force = gsl_vector_get(data->rawforce, i) - data->bl_a - data->bl_b * tss; - if (abs(force) < range) + if (fabs(force) < range) sd += sqr(tss - shift); i++; diff --git a/src/fs_select_tree.cpp b/src/fs_select_tree.cpp index fff072d..407cf5e 100644 --- a/src/fs_select_tree.cpp +++ b/src/fs_select_tree.cpp @@ -1,3 +1,4 @@ +#include #include "fs_select_tree.h" void fs_select::Tree::loadTree(string filename) -- 1.5.4.3