[libfann] 110/242: make sure the compiler treats numbers as floats
Christian Kastner
chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:10:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
chrisk-guest pushed a commit to tag Version2_0_0
in repository libfann.
commit 6936d6bcfc9a6013bc5f69a3fa550e138361705c
Author: Evan Nemerson <evan at coeus-group.com>
Date: Thu Mar 25 05:28:15 2004 +0000
make sure the compiler treats numbers as floats
---
src/include/fann_activation.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/include/fann_activation.h b/src/include/fann_activation.h
index 10b11aa..33b1fe9 100644
--- a/src/include/fann_activation.h
+++ b/src/include/fann_activation.h
@@ -114,11 +114,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define fann_linear_derive(steepness, value) (steepness)
/* FANN_SIGMOID */
-#define fann_sigmoid(steepness, value) (1.0/(1.0 + exp(-2.0 * steepness * value)))
-#define fann_sigmoid_derive(steepness, value) (2.0 * steepness * value * (1.0 - value)) /* the plus is a trick to the derived function, to avoid getting stuck on flat spots */
+#define fann_sigmoid(steepness, value) (1.0f/(1.0f + exp(-2.0f * steepness * value)))
+#define fann_sigmoid_derive(steepness, value) (2.0f * steepness * value * (1.0f - value)) /* the plus is a trick to the derived function, to avoid getting stuck on flat spots */
/* FANN_SIGMOID_SYMMETRIC */
-#define fann_sigmoid_symmetric(steepness, value) (2.0/(1.0 + exp(-2.0 * steepness * value)) - 1.0)
+#define fann_sigmoid_symmetric(steepness, value) (2.0f/(1.0f + exp(-2.0f * steepness * value)) - 1.0f)
#define fann_sigmoid_symmetric_derive(steepness, value) steepness * (1.0f - (value*value))
/* FANN_GAUSSIAN */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libfann.git
More information about the debian-science-commits
mailing list