summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2008-04-18 14:50:48 +0000
committerjofret2008-04-18 14:50:48 +0000
commit75e0319a0cea635ed67524d7753eac145b24614c (patch)
tree371e3d7805de46c87a853497cedcea782b00935a
parent6099917d1f32d6b1132d4df41548e0f1281f7d05 (diff)
downloadscilab2c-75e0319a0cea635ed67524d7753eac145b24614c.tar.gz
scilab2c-75e0319a0cea635ed67524d7753eac145b24614c.tar.bz2
scilab2c-75e0319a0cea635ed67524d7753eac145b24614c.zip
Double vs Float better management. Enable psycho warnings.
-rw-r--r--src/elementaryFunctions/tanh/Makefile.am24
-rw-r--r--src/elementaryFunctions/tanh/Makefile.in93
-rw-r--r--src/elementaryFunctions/tanh/stanhs.c22
-rw-r--r--src/elementaryFunctions/tanh/testDoubleTanh.c57
-rw-r--r--src/elementaryFunctions/tanh/testFloatTanh.c57
-rw-r--r--src/elementaryFunctions/tanh/testTanh.c91
6 files changed, 201 insertions, 143 deletions
diff --git a/src/elementaryFunctions/tanh/Makefile.am b/src/elementaryFunctions/tanh/Makefile.am
index 7f438247..2f8ef187 100644
--- a/src/elementaryFunctions/tanh/Makefile.am
+++ b/src/elementaryFunctions/tanh/Makefile.am
@@ -37,19 +37,23 @@ HEAD = ../includes/tanh.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-check_PROGRAMS = testTanh
-
-TESTS = testTanh
-
-#
-# -*- Hyperbolic Tangeant Tests -*-
-#
-testTanh_SOURCES = testTanh.c
-testTanh_CFLAGS = $(check_INCLUDES)
-testTanh_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/tan/libTan.la \
$(top_builddir)/elementaryFunctions/tanh/libTanh.la \
@LIBMATH@
+check_PROGRAMS = testFloatTanh testDoubleTanh
+
+TESTS = testFloatTanh testDoubleTanh
+
+#
+# -*- Hyperbolic Tangeant Tests -*-
+#
+testFloatTanh_SOURCES = testFloatTanh.c
+testFloatTanh_CFLAGS = $(check_INCLUDES)
+testFloatTanh_LDADD = $(check_LDADD)
+testDoubleTanh_SOURCES = testDoubleTanh.c
+testDoubleTanh_CFLAGS = $(check_INCLUDES)
+testDoubleTanh_LDADD = $(check_LDADD) \ No newline at end of file
diff --git a/src/elementaryFunctions/tanh/Makefile.in b/src/elementaryFunctions/tanh/Makefile.in
index bad1ba69..38ff52cf 100644
--- a/src/elementaryFunctions/tanh/Makefile.in
+++ b/src/elementaryFunctions/tanh/Makefile.in
@@ -32,8 +32,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = testTanh$(EXEEXT)
-TESTS = testTanh$(EXEEXT)
+check_PROGRAMS = testFloatTanh$(EXEEXT) testDoubleTanh$(EXEEXT)
+TESTS = testFloatTanh$(EXEEXT) testDoubleTanh$(EXEEXT)
subdir = elementaryFunctions/tanh
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -62,15 +62,22 @@ libTanh_la_OBJECTS = $(am_libTanh_la_OBJECTS)
libTanh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libTanh_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_testTanh_OBJECTS = testTanh-testTanh.$(OBJEXT)
-testTanh_OBJECTS = $(am_testTanh_OBJECTS)
-testTanh_DEPENDENCIES = $(top_builddir)/type/libDoubleComplex.la \
+am_testDoubleTanh_OBJECTS = testDoubleTanh-testDoubleTanh.$(OBJEXT)
+testDoubleTanh_OBJECTS = $(am_testDoubleTanh_OBJECTS)
+am__DEPENDENCIES_1 = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/tan/libTan.la \
$(top_builddir)/elementaryFunctions/tanh/libTanh.la
-testTanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(testTanh_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+testDoubleTanh_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testDoubleTanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleTanh_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatTanh_OBJECTS = testFloatTanh-testFloatTanh.$(OBJEXT)
+testFloatTanh_OBJECTS = $(am_testFloatTanh_OBJECTS)
+testFloatTanh_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testFloatTanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatTanh_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I. -I$(top_builddir)/includes@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -83,8 +90,10 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(libTanh_la_SOURCES) $(testTanh_SOURCES)
-DIST_SOURCES = $(libTanh_la_SOURCES) $(testTanh_SOURCES)
+SOURCES = $(libTanh_la_SOURCES) $(testDoubleTanh_SOURCES) \
+ $(testFloatTanh_SOURCES)
+DIST_SOURCES = $(libTanh_la_SOURCES) $(testDoubleTanh_SOURCES) \
+ $(testFloatTanh_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -219,18 +228,22 @@ HEAD = ../includes/tanh.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-
-#
-# -*- Hyperbolic Tangeant Tests -*-
-#
-testTanh_SOURCES = testTanh.c
-testTanh_CFLAGS = $(check_INCLUDES)
-testTanh_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/tan/libTan.la \
$(top_builddir)/elementaryFunctions/tanh/libTanh.la \
@LIBMATH@
+
+#
+# -*- Hyperbolic Tangeant Tests -*-
+#
+testFloatTanh_SOURCES = testFloatTanh.c
+testFloatTanh_CFLAGS = $(check_INCLUDES)
+testFloatTanh_LDADD = $(check_LDADD)
+testDoubleTanh_SOURCES = testDoubleTanh.c
+testDoubleTanh_CFLAGS = $(check_INCLUDES)
+testDoubleTanh_LDADD = $(check_LDADD)
all: all-am
.SUFFIXES:
@@ -300,9 +313,12 @@ clean-checkPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
-testTanh$(EXEEXT): $(testTanh_OBJECTS) $(testTanh_DEPENDENCIES)
- @rm -f testTanh$(EXEEXT)
- $(testTanh_LINK) $(testTanh_OBJECTS) $(testTanh_LDADD) $(LIBS)
+testDoubleTanh$(EXEEXT): $(testDoubleTanh_OBJECTS) $(testDoubleTanh_DEPENDENCIES)
+ @rm -f testDoubleTanh$(EXEEXT)
+ $(testDoubleTanh_LINK) $(testDoubleTanh_OBJECTS) $(testDoubleTanh_LDADD) $(LIBS)
+testFloatTanh$(EXEEXT): $(testFloatTanh_OBJECTS) $(testFloatTanh_DEPENDENCIES)
+ @rm -f testFloatTanh$(EXEEXT)
+ $(testFloatTanh_LINK) $(testFloatTanh_OBJECTS) $(testFloatTanh_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -318,7 +334,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-stanhs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-ztanha.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-ztanhs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testTanh-testTanh.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleTanh-testDoubleTanh.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatTanh-testFloatTanh.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -397,19 +414,33 @@ libTanh_la-ztanha.lo: ztanha.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-ztanha.lo `test -f 'ztanha.c' || echo '$(srcdir)/'`ztanha.c
-testTanh-testTanh.o: testTanh.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testTanh_CFLAGS) $(CFLAGS) -MT testTanh-testTanh.o -MD -MP -MF $(DEPDIR)/testTanh-testTanh.Tpo -c -o testTanh-testTanh.o `test -f 'testTanh.c' || echo '$(srcdir)/'`testTanh.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testTanh-testTanh.Tpo $(DEPDIR)/testTanh-testTanh.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testTanh.c' object='testTanh-testTanh.o' libtool=no @AMDEPBACKSLASH@
+testDoubleTanh-testDoubleTanh.o: testDoubleTanh.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -MT testDoubleTanh-testDoubleTanh.o -MD -MP -MF $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo -c -o testDoubleTanh-testDoubleTanh.o `test -f 'testDoubleTanh.c' || echo '$(srcdir)/'`testDoubleTanh.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo $(DEPDIR)/testDoubleTanh-testDoubleTanh.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTanh.c' object='testDoubleTanh-testDoubleTanh.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -c -o testDoubleTanh-testDoubleTanh.o `test -f 'testDoubleTanh.c' || echo '$(srcdir)/'`testDoubleTanh.c
+
+testDoubleTanh-testDoubleTanh.obj: testDoubleTanh.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -MT testDoubleTanh-testDoubleTanh.obj -MD -MP -MF $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo -c -o testDoubleTanh-testDoubleTanh.obj `if test -f 'testDoubleTanh.c'; then $(CYGPATH_W) 'testDoubleTanh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTanh.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo $(DEPDIR)/testDoubleTanh-testDoubleTanh.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTanh.c' object='testDoubleTanh-testDoubleTanh.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -c -o testDoubleTanh-testDoubleTanh.obj `if test -f 'testDoubleTanh.c'; then $(CYGPATH_W) 'testDoubleTanh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTanh.c'; fi`
+
+testFloatTanh-testFloatTanh.o: testFloatTanh.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -MT testFloatTanh-testFloatTanh.o -MD -MP -MF $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo -c -o testFloatTanh-testFloatTanh.o `test -f 'testFloatTanh.c' || echo '$(srcdir)/'`testFloatTanh.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo $(DEPDIR)/testFloatTanh-testFloatTanh.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTanh.c' object='testFloatTanh-testFloatTanh.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testTanh_CFLAGS) $(CFLAGS) -c -o testTanh-testTanh.o `test -f 'testTanh.c' || echo '$(srcdir)/'`testTanh.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -c -o testFloatTanh-testFloatTanh.o `test -f 'testFloatTanh.c' || echo '$(srcdir)/'`testFloatTanh.c
-testTanh-testTanh.obj: testTanh.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testTanh_CFLAGS) $(CFLAGS) -MT testTanh-testTanh.obj -MD -MP -MF $(DEPDIR)/testTanh-testTanh.Tpo -c -o testTanh-testTanh.obj `if test -f 'testTanh.c'; then $(CYGPATH_W) 'testTanh.c'; else $(CYGPATH_W) '$(srcdir)/testTanh.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testTanh-testTanh.Tpo $(DEPDIR)/testTanh-testTanh.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testTanh.c' object='testTanh-testTanh.obj' libtool=no @AMDEPBACKSLASH@
+testFloatTanh-testFloatTanh.obj: testFloatTanh.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -MT testFloatTanh-testFloatTanh.obj -MD -MP -MF $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo -c -o testFloatTanh-testFloatTanh.obj `if test -f 'testFloatTanh.c'; then $(CYGPATH_W) 'testFloatTanh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTanh.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo $(DEPDIR)/testFloatTanh-testFloatTanh.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTanh.c' object='testFloatTanh-testFloatTanh.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testTanh_CFLAGS) $(CFLAGS) -c -o testTanh-testTanh.obj `if test -f 'testTanh.c'; then $(CYGPATH_W) 'testTanh.c'; else $(CYGPATH_W) '$(srcdir)/testTanh.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -c -o testFloatTanh-testFloatTanh.obj `if test -f 'testFloatTanh.c'; then $(CYGPATH_W) 'testFloatTanh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTanh.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
diff --git a/src/elementaryFunctions/tanh/stanhs.c b/src/elementaryFunctions/tanh/stanhs.c
index 68c71391..80462855 100644
--- a/src/elementaryFunctions/tanh/stanhs.c
+++ b/src/elementaryFunctions/tanh/stanhs.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** stanhs.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Dec 7 11:05:37 2006 jofret
-** Last update Fri Apr 20 14:42:07 2007 jofret
-**
-** Copyright INRIA 2006
-*/
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
#include <math.h>
#include "tanh.h"
float stanhs(float x) {
- return (tanh(x));
+ return (tanhf(x));
}
diff --git a/src/elementaryFunctions/tanh/testDoubleTanh.c b/src/elementaryFunctions/tanh/testDoubleTanh.c
new file mode 100644
index 00000000..2be5454d
--- /dev/null
+++ b/src/elementaryFunctions/tanh/testDoubleTanh.c
@@ -0,0 +1,57 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "testTanh.h"
+
+void dtanhsTest() {
+ printf(">> Double scalar\n");
+ printf("dtanhs(0) = %e\n", dtanhs(0.0));
+ printf("dtanhs(PI) = %e\n", dtanhs(DPI));
+ printf("dtanhs(PI/2) = %e\n", dtanhs(DPI/2));
+ printf("dtanhs(PI/3) = %e\n", dtanhs(DPI/3));
+ printf("dtanhs(PI/4) = %e\n", dtanhs(DPI/4));
+ printf("dtanhs(PI/6) = %e\n", dtanhs(DPI/6));
+ printf("dtanhs(-PI) = %e\n", dtanhs(-DPI));
+ printf("dtanhs(-PI/2) = %e\n", dtanhs(-DPI/2));
+ printf("dtanhs(-PI/3) = %e\n", dtanhs(-DPI/3));
+ printf("dtanhs(-PI/4) = %e\n", dtanhs(-DPI/4));
+ printf("dtanhs(-PI/6) = %e\n", dtanhs(-DPI/6));
+}
+
+void ztanhsTest() {
+ printf(">> Double Complex scalar\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void dtanhaTest() {
+ printf(">> Double array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void ztanhaTest() {
+ printf(">> Double Complex array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+int testTanh() {
+ printf("\n>>>> Double Hyperbolic Tangeant Tests\n");
+ dtanhsTest();
+ ztanhsTest();
+ dtanhaTest();
+ ztanhaTest();
+ return 0;
+}
+
+int main() {
+ assert(testTanh() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/tanh/testFloatTanh.c b/src/elementaryFunctions/tanh/testFloatTanh.c
new file mode 100644
index 00000000..ba72e897
--- /dev/null
+++ b/src/elementaryFunctions/tanh/testFloatTanh.c
@@ -0,0 +1,57 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "testTanh.h"
+
+void stanhsTest() {
+ printf(">> Float scalar\n");
+ printf("stanhs(0) = %f\n", stanhs(0.0f));
+ printf("stanhs(PI) = %f\n", stanhs(FPI));
+ printf("stanhs(PI/2) = %f\n", stanhs(FPI/2));
+ printf("stanhs(PI/3) = %f\n", stanhs(FPI/3));
+ printf("stanhs(PI/4) = %f\n", stanhs(FPI/4));
+ printf("stanhs(PI/6) = %f\n", stanhs(FPI/6));
+ printf("stanhs(-PI) = %f\n", stanhs(-FPI));
+ printf("stanhs(-PI/2) = %f\n", stanhs(-FPI/2));
+ printf("stanhs(-PI/3) = %f\n", stanhs(-FPI/3));
+ printf("stanhs(-PI/4) = %f\n", stanhs(-FPI/4));
+ printf("stanhs(-PI/6) = %f\n", stanhs(-FPI/6));
+}
+
+void ctanhsTest() {
+ printf(">> Float Complex scalar\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void stanhaTest() {
+ printf(">> Float array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void ctanhaTest() {
+ printf(">> Float Complex array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+int testTanh() {
+ printf("\n>>>> Float Hyperbolic Tangeant Tests\n");
+ stanhsTest();
+ ctanhsTest();
+ stanhaTest();
+ ctanhaTest();
+ return 0;
+}
+
+int main() {
+ assert(testTanh() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/tanh/testTanh.c b/src/elementaryFunctions/tanh/testTanh.c
deleted file mode 100644
index f0ee3e61..00000000
--- a/src/elementaryFunctions/tanh/testTanh.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-** -*- C -*-
-**
-** testTanh.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Fri Mar 30 14:07:53 2007 jofret
-**
-** Copyright INRIA 2006
-*/
-
-#include "testTanh.h"
-
-void stanhsTest() {
- printf(">> Float scalar\n");
- printf("stanhs(0) = %f\n", stanhs((float) 0));
- printf("stanhs(PI) = %f\n", stanhs(PI));
- printf("stanhs(PI/2) = %f\n", stanhs(PI/2));
- printf("stanhs(PI/3) = %f\n", stanhs(PI/3));
- printf("stanhs(PI/4) = %f\n", stanhs(PI/4));
- printf("stanhs(PI/6) = %f\n", stanhs(PI/6));
- printf("stanhs(-PI) = %f\n", stanhs(-PI));
- printf("stanhs(-PI/2) = %f\n", stanhs(-PI/2));
- printf("stanhs(-PI/3) = %f\n", stanhs(-PI/3));
- printf("stanhs(-PI/4) = %f\n", stanhs(-PI/4));
- printf("stanhs(-PI/6) = %f\n", stanhs(-PI/6));
-}
-
-void dtanhsTest() {
- printf(">> Double scalar\n");
- printf("dtanhs(0) = %e\n", dtanhs((double) 0));
- printf("dtanhs(PI) = %e\n", dtanhs(PI));
- printf("dtanhs(PI/2) = %e\n", dtanhs(PI/2));
- printf("dtanhs(PI/3) = %e\n", dtanhs(PI/3));
- printf("dtanhs(PI/4) = %e\n", dtanhs(PI/4));
- printf("dtanhs(PI/6) = %e\n", dtanhs(PI/6));
- printf("dtanhs(-PI) = %e\n", dtanhs(-PI));
- printf("dtanhs(-PI/2) = %e\n", dtanhs(-PI/2));
- printf("dtanhs(-PI/3) = %e\n", dtanhs(-PI/3));
- printf("dtanhs(-PI/4) = %e\n", dtanhs(-PI/4));
- printf("dtanhs(-PI/6) = %e\n", dtanhs(-PI/6));
-}
-
-void ctanhsTest() {
- printf(">> Float Complex scalar\n");
- /* FIXME : Implement some test here ... */
-}
-
-void ztanhsTest() {
- printf(">> Double Complex scalar\n");
- /* FIXME : Implement some test here ... */
-}
-
-void stanhaTest() {
- printf(">> Float array\n");
- /* FIXME : Implement some test here ... */
-}
-
-void dtanhaTest() {
- printf(">> Double array\n");
- /* FIXME : Implement some test here ... */
-}
-
-void ctanhaTest() {
- printf(">> Float Complex array\n");
- /* FIXME : Implement some test here ... */
-}
-
-void ztanhaTest() {
- printf(">> Double Complex array\n");
- /* FIXME : Implement some test here ... */
-}
-
-int testTanh() {
- printf("\n>>>> Hyperbolic Tangeant Tests\n");
- stanhsTest();
- dtanhsTest();
- ctanhsTest();
- ztanhsTest();
- stanhaTest();
- dtanhaTest();
- ctanhaTest();
- ztanhaTest();
- return 0;
-}
-
-int main() {
- assert(testTanh() == 0);
- return 0;
-}