summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2008-04-21 09:17:16 +0000
committerjofret2008-04-21 09:17:16 +0000
commit55d656c04e942577070c866b9c10e600bb8b352d (patch)
tree08e02d7b068c227859cb42bb241a5e28c8be41ac
parent734e3acf716a616781097abad96ae95ce4a9dd7c (diff)
downloadscilab2c-55d656c04e942577070c866b9c10e600bb8b352d.tar.gz
scilab2c-55d656c04e942577070c866b9c10e600bb8b352d.tar.bz2
scilab2c-55d656c04e942577070c866b9c10e600bb8b352d.zip
Double vs Float better management. Enable psycho warnings.
-rw-r--r--src/elementaryFunctions/exp10/Makefile.am22
-rw-r--r--src/elementaryFunctions/exp10/Makefile.in84
-rw-r--r--src/elementaryFunctions/exp10/sexp10s.c22
-rw-r--r--src/elementaryFunctions/exp10/testDoubleExp10.c45
-rw-r--r--src/elementaryFunctions/exp10/testExp10.c66
-rw-r--r--src/elementaryFunctions/exp10/testFloatExp10.c45
6 files changed, 173 insertions, 111 deletions
diff --git a/src/elementaryFunctions/exp10/Makefile.am b/src/elementaryFunctions/exp10/Makefile.am
index 21ff94df..798b1955 100644
--- a/src/elementaryFunctions/exp10/Makefile.am
+++ b/src/elementaryFunctions/exp10/Makefile.am
@@ -37,17 +37,23 @@ HEAD = ../includes/exp10.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-check_PROGRAMS = testExp10
-
-TESTS = testExp10
-
-testExp10_SOURCES = testExp10.c
-testExp10_CFLAGS = $(check_INCLUDES)
-testExp10_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/cos/libCos.la \
$(top_builddir)/elementaryFunctions/sin/libSin.la \
$(top_builddir)/elementaryFunctions/cosh/libCosh.la \
$(top_builddir)/elementaryFunctions/sinh/libSinh.la \
$(top_builddir)/elementaryFunctions/exp10/libExp10.la \
- @LIBMATH@ \ No newline at end of file
+ @LIBMATH@
+
+check_PROGRAMS = testFloatExp10 testDoubleExp10
+
+TESTS = testFloatExp10 testDoubleExp10
+
+testFloatExp10_SOURCES = testFloatExp10.c
+testFloatExp10_CFLAGS = $(check_INCLUDES)
+testFloatExp10_LDADD = $(check_LDADD)
+
+testDoubleExp10_SOURCES = testDoubleExp10.c
+testDoubleExp10_CFLAGS = $(check_INCLUDES)
+testDoubleExp10_LDADD = $(check_LDADD)
diff --git a/src/elementaryFunctions/exp10/Makefile.in b/src/elementaryFunctions/exp10/Makefile.in
index 67416567..dbcc8653 100644
--- a/src/elementaryFunctions/exp10/Makefile.in
+++ b/src/elementaryFunctions/exp10/Makefile.in
@@ -32,8 +32,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = testExp10$(EXEEXT)
-TESTS = testExp10$(EXEEXT)
+check_PROGRAMS = testFloatExp10$(EXEEXT) testDoubleExp10$(EXEEXT)
+TESTS = testFloatExp10$(EXEEXT) testDoubleExp10$(EXEEXT)
subdir = elementaryFunctions/exp10
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -63,17 +63,25 @@ libExp10_la_OBJECTS = $(am_libExp10_la_OBJECTS)
libExp10_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libExp10_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_testExp10_OBJECTS = testExp10-testExp10.$(OBJEXT)
-testExp10_OBJECTS = $(am_testExp10_OBJECTS)
-testExp10_DEPENDENCIES = $(top_builddir)/type/libDoubleComplex.la \
+am_testDoubleExp10_OBJECTS = \
+ testDoubleExp10-testDoubleExp10.$(OBJEXT)
+testDoubleExp10_OBJECTS = $(am_testDoubleExp10_OBJECTS)
+am__DEPENDENCIES_1 = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/cos/libCos.la \
$(top_builddir)/elementaryFunctions/sin/libSin.la \
$(top_builddir)/elementaryFunctions/cosh/libCosh.la \
$(top_builddir)/elementaryFunctions/sinh/libSinh.la \
$(top_builddir)/elementaryFunctions/exp10/libExp10.la
-testExp10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testExp10_CFLAGS) \
+testDoubleExp10_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testDoubleExp10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleExp10_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatExp10_OBJECTS = testFloatExp10-testFloatExp10.$(OBJEXT)
+testFloatExp10_OBJECTS = $(am_testFloatExp10_OBJECTS)
+testFloatExp10_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testFloatExp10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatExp10_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I. -I$(top_builddir)/includes@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@@ -87,8 +95,10 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(libExp10_la_SOURCES) $(testExp10_SOURCES)
-DIST_SOURCES = $(libExp10_la_SOURCES) $(testExp10_SOURCES)
+SOURCES = $(libExp10_la_SOURCES) $(testDoubleExp10_SOURCES) \
+ $(testFloatExp10_SOURCES)
+DIST_SOURCES = $(libExp10_la_SOURCES) $(testDoubleExp10_SOURCES) \
+ $(testFloatExp10_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -223,9 +233,7 @@ HEAD = ../includes/exp10.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-testExp10_SOURCES = testExp10.c
-testExp10_CFLAGS = $(check_INCLUDES)
-testExp10_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/cos/libCos.la \
$(top_builddir)/elementaryFunctions/sin/libSin.la \
@@ -234,6 +242,12 @@ testExp10_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/elementaryFunctions/exp10/libExp10.la \
@LIBMATH@
+testFloatExp10_SOURCES = testFloatExp10.c
+testFloatExp10_CFLAGS = $(check_INCLUDES)
+testFloatExp10_LDADD = $(check_LDADD)
+testDoubleExp10_SOURCES = testDoubleExp10.c
+testDoubleExp10_CFLAGS = $(check_INCLUDES)
+testDoubleExp10_LDADD = $(check_LDADD)
all: all-am
.SUFFIXES:
@@ -303,9 +317,12 @@ clean-checkPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
-testExp10$(EXEEXT): $(testExp10_OBJECTS) $(testExp10_DEPENDENCIES)
- @rm -f testExp10$(EXEEXT)
- $(testExp10_LINK) $(testExp10_OBJECTS) $(testExp10_LDADD) $(LIBS)
+testDoubleExp10$(EXEEXT): $(testDoubleExp10_OBJECTS) $(testDoubleExp10_DEPENDENCIES)
+ @rm -f testDoubleExp10$(EXEEXT)
+ $(testDoubleExp10_LINK) $(testDoubleExp10_OBJECTS) $(testDoubleExp10_LDADD) $(LIBS)
+testFloatExp10$(EXEEXT): $(testFloatExp10_OBJECTS) $(testFloatExp10_DEPENDENCIES)
+ @rm -f testFloatExp10$(EXEEXT)
+ $(testFloatExp10_LINK) $(testFloatExp10_OBJECTS) $(testFloatExp10_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -321,7 +338,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-sexp10s.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-zexp10a.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-zexp10s.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testExp10-testExp10.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleExp10-testDoubleExp10.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatExp10-testFloatExp10.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -400,19 +418,33 @@ libExp10_la-zexp10a.lo: zexp10a.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) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-zexp10a.lo `test -f 'zexp10a.c' || echo '$(srcdir)/'`zexp10a.c
-testExp10-testExp10.o: testExp10.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testExp10_CFLAGS) $(CFLAGS) -MT testExp10-testExp10.o -MD -MP -MF $(DEPDIR)/testExp10-testExp10.Tpo -c -o testExp10-testExp10.o `test -f 'testExp10.c' || echo '$(srcdir)/'`testExp10.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testExp10-testExp10.Tpo $(DEPDIR)/testExp10-testExp10.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testExp10.c' object='testExp10-testExp10.o' libtool=no @AMDEPBACKSLASH@
+testDoubleExp10-testDoubleExp10.o: testDoubleExp10.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp10_CFLAGS) $(CFLAGS) -MT testDoubleExp10-testDoubleExp10.o -MD -MP -MF $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo -c -o testDoubleExp10-testDoubleExp10.o `test -f 'testDoubleExp10.c' || echo '$(srcdir)/'`testDoubleExp10.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo $(DEPDIR)/testDoubleExp10-testDoubleExp10.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp10.c' object='testDoubleExp10-testDoubleExp10.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) $(testDoubleExp10_CFLAGS) $(CFLAGS) -c -o testDoubleExp10-testDoubleExp10.o `test -f 'testDoubleExp10.c' || echo '$(srcdir)/'`testDoubleExp10.c
+
+testDoubleExp10-testDoubleExp10.obj: testDoubleExp10.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp10_CFLAGS) $(CFLAGS) -MT testDoubleExp10-testDoubleExp10.obj -MD -MP -MF $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo -c -o testDoubleExp10-testDoubleExp10.obj `if test -f 'testDoubleExp10.c'; then $(CYGPATH_W) 'testDoubleExp10.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp10.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo $(DEPDIR)/testDoubleExp10-testDoubleExp10.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp10.c' object='testDoubleExp10-testDoubleExp10.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) $(testDoubleExp10_CFLAGS) $(CFLAGS) -c -o testDoubleExp10-testDoubleExp10.obj `if test -f 'testDoubleExp10.c'; then $(CYGPATH_W) 'testDoubleExp10.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp10.c'; fi`
+
+testFloatExp10-testFloatExp10.o: testFloatExp10.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -MT testFloatExp10-testFloatExp10.o -MD -MP -MF $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo -c -o testFloatExp10-testFloatExp10.o `test -f 'testFloatExp10.c' || echo '$(srcdir)/'`testFloatExp10.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo $(DEPDIR)/testFloatExp10-testFloatExp10.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp10.c' object='testFloatExp10-testFloatExp10.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) $(testExp10_CFLAGS) $(CFLAGS) -c -o testExp10-testExp10.o `test -f 'testExp10.c' || echo '$(srcdir)/'`testExp10.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -c -o testFloatExp10-testFloatExp10.o `test -f 'testFloatExp10.c' || echo '$(srcdir)/'`testFloatExp10.c
-testExp10-testExp10.obj: testExp10.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testExp10_CFLAGS) $(CFLAGS) -MT testExp10-testExp10.obj -MD -MP -MF $(DEPDIR)/testExp10-testExp10.Tpo -c -o testExp10-testExp10.obj `if test -f 'testExp10.c'; then $(CYGPATH_W) 'testExp10.c'; else $(CYGPATH_W) '$(srcdir)/testExp10.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testExp10-testExp10.Tpo $(DEPDIR)/testExp10-testExp10.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testExp10.c' object='testExp10-testExp10.obj' libtool=no @AMDEPBACKSLASH@
+testFloatExp10-testFloatExp10.obj: testFloatExp10.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -MT testFloatExp10-testFloatExp10.obj -MD -MP -MF $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo -c -o testFloatExp10-testFloatExp10.obj `if test -f 'testFloatExp10.c'; then $(CYGPATH_W) 'testFloatExp10.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp10.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo $(DEPDIR)/testFloatExp10-testFloatExp10.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp10.c' object='testFloatExp10-testFloatExp10.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) $(testExp10_CFLAGS) $(CFLAGS) -c -o testExp10-testExp10.obj `if test -f 'testExp10.c'; then $(CYGPATH_W) 'testExp10.c'; else $(CYGPATH_W) '$(srcdir)/testExp10.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -c -o testFloatExp10-testFloatExp10.obj `if test -f 'testFloatExp10.c'; then $(CYGPATH_W) 'testFloatExp10.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp10.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
diff --git a/src/elementaryFunctions/exp10/sexp10s.c b/src/elementaryFunctions/exp10/sexp10s.c
index d34955fe..8f428293 100644
--- a/src/elementaryFunctions/exp10/sexp10s.c
+++ b/src/elementaryFunctions/exp10/sexp10s.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** sexp10s.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Dec 7 11:05:37 2006 jofret
-** Last update Thu Sep 6 17:06:47 2007 bruno
-**
-** Copyright INRIA 2006
-*/
+ * 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 <math.h>
#include "exp10.h"
float sexp10s(float x) {
- return (pow(10,x));
+ return (powf(10,x));
}
diff --git a/src/elementaryFunctions/exp10/testDoubleExp10.c b/src/elementaryFunctions/exp10/testDoubleExp10.c
new file mode 100644
index 00000000..4fdb2d07
--- /dev/null
+++ b/src/elementaryFunctions/exp10/testDoubleExp10.c
@@ -0,0 +1,45 @@
+/*
+ * 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 "testExp10.h"
+
+void dexp10sTest(void) {
+ printf(">> Double scalar\n");
+ printf("dexp10s(0) = %e\n", dexp10s(0.0));
+ printf("dexp10s(PI) = %e\n", dexp10s(DPI));
+ printf("dexp10s(PI/2) = %e\n", dexp10s(DPI/2));
+ printf("dexp10s(PI/3) = %e\n", dexp10s(DPI/3));
+ printf("dexp10s(PI/4) = %e\n", dexp10s(DPI/4));
+ printf("dexp10s(PI/6) = %e\n", dexp10s(DPI/6));
+ printf("dexp10s(-PI) = %e\n", dexp10s(-DPI));
+ printf("dexp10s(-PI/2) = %e\n", dexp10s(-DPI/2));
+ printf("dexp10s(-PI/3) = %e\n", dexp10s(-DPI/3));
+ printf("dexp10s(-PI/4) = %e\n", dexp10s(-DPI/4));
+ printf("dexp10s(-PI/6) = %e\n", dexp10s(-DPI/6));
+}
+
+int testExp10(void) {
+ printf("\n>>>> Double 10-Base Exponential Tests\n");
+ dexp10sTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ zexp10sTest();
+ dexp10aTest();
+ zexp10aTest();
+ */
+ return 0;
+}
+
+int main(void) {
+ assert(testExp10() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/exp10/testExp10.c b/src/elementaryFunctions/exp10/testExp10.c
deleted file mode 100644
index e6b0c9d1..00000000
--- a/src/elementaryFunctions/exp10/testExp10.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-** -*- C -*-
-**
-** testExp10.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Thu Sep 6 16:56:42 2007 bruno
-**
-** Copyright INRIA 2006
-*/
-
-#include "testExp10.h"
-
-#define PI 3.1415826535
-
-void sexp10sTest(void) {
- printf(">> Float scalar\n");
- printf("sexp10s(0) = %f\n", sexp10s((float) 0));
- printf("sexp10s(PI) = %f\n", sexp10s(PI));
- printf("sexp10s(PI/2) = %f\n", sexp10s(PI/2));
- printf("sexp10s(PI/3) = %f\n", sexp10s(PI/3));
- printf("sexp10s(PI/4) = %f\n", sexp10s(PI/4));
- printf("sexp10s(PI/6) = %f\n", sexp10s(PI/6));
- printf("sexp10s(-PI) = %f\n", sexp10s(-PI));
- printf("sexp10s(-PI/2) = %f\n", sexp10s(-PI/2));
- printf("sexp10s(-PI/3) = %f\n", sexp10s(-PI/3));
- printf("sexp10s(-PI/4) = %f\n", sexp10s(-PI/4));
- printf("sexp10s(-PI/6) = %f\n", sexp10s(-PI/6));
-}
-
-void dexp10sTest(void) {
- printf(">> Double scalar\n");
- printf("dexp10s(0) = %e\n", dexp10s((double) 0));
- printf("dexp10s(PI) = %e\n", dexp10s(PI));
- printf("dexp10s(PI/2) = %e\n", dexp10s(PI/2));
- printf("dexp10s(PI/3) = %e\n", dexp10s(PI/3));
- printf("dexp10s(PI/4) = %e\n", dexp10s(PI/4));
- printf("dexp10s(PI/6) = %e\n", dexp10s(PI/6));
- printf("dexp10s(-PI) = %e\n", dexp10s(-PI));
- printf("dexp10s(-PI/2) = %e\n", dexp10s(-PI/2));
- printf("dexp10s(-PI/3) = %e\n", dexp10s(-PI/3));
- printf("dexp10s(-PI/4) = %e\n", dexp10s(-PI/4));
- printf("dexp10s(-PI/6) = %e\n", dexp10s(-PI/6));
-}
-
-int testExp10(void) {
- printf("\n>>>> Exp10onential Tests\n");
- sexp10sTest();
- dexp10sTest();
- /* FIXME : Implement some test here ... */
- /*
- cexp10sTest();
- zexp10sTest();
- sexp10aTest();
- dexp10aTest();
- cexp10aTest();
- zexp10aTest();
- */
- return 0;
-}
-
-int main(void) {
- assert(testExp10() == 0);
- return 0;
-}
diff --git a/src/elementaryFunctions/exp10/testFloatExp10.c b/src/elementaryFunctions/exp10/testFloatExp10.c
new file mode 100644
index 00000000..96d64595
--- /dev/null
+++ b/src/elementaryFunctions/exp10/testFloatExp10.c
@@ -0,0 +1,45 @@
+/*
+ * 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 "testExp10.h"
+
+void sexp10sTest(void) {
+ printf(">> Float scalar\n");
+ printf("sexp10s(0) = %f\n", sexp10s(0.0f));
+ printf("sexp10s(PI) = %f\n", sexp10s(FPI));
+ printf("sexp10s(PI/2) = %f\n", sexp10s(FPI/2));
+ printf("sexp10s(PI/3) = %f\n", sexp10s(FPI/3));
+ printf("sexp10s(PI/4) = %f\n", sexp10s(FPI/4));
+ printf("sexp10s(PI/6) = %f\n", sexp10s(FPI/6));
+ printf("sexp10s(-PI) = %f\n", sexp10s(-FPI));
+ printf("sexp10s(-PI/2) = %f\n", sexp10s(-FPI/2));
+ printf("sexp10s(-PI/3) = %f\n", sexp10s(-FPI/3));
+ printf("sexp10s(-PI/4) = %f\n", sexp10s(-FPI/4));
+ printf("sexp10s(-PI/6) = %f\n", sexp10s(-FPI/6));
+}
+
+int testExp10(void) {
+ printf("\n>>>> Float 10-Base Exponential Tests\n");
+ sexp10sTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ cexp10sTest();
+ sexp10aTest();
+ cexp10aTest();
+ */
+ return 0;
+}
+
+int main(void) {
+ assert(testExp10() == 0);
+ return 0;
+}