summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/elementaryFunctions/exp/Makefile.am22
-rw-r--r--src/elementaryFunctions/exp/Makefile.in85
-rw-r--r--src/elementaryFunctions/exp/sexps.c22
-rw-r--r--src/elementaryFunctions/exp/testDoubleExp.c46
-rw-r--r--src/elementaryFunctions/exp/testExp.c66
-rw-r--r--src/elementaryFunctions/exp/testFloatExp.c46
6 files changed, 175 insertions, 112 deletions
diff --git a/src/elementaryFunctions/exp/Makefile.am b/src/elementaryFunctions/exp/Makefile.am
index ca1fbc28..185cb1cb 100644
--- a/src/elementaryFunctions/exp/Makefile.am
+++ b/src/elementaryFunctions/exp/Makefile.am
@@ -37,17 +37,23 @@ HEAD = ../includes/exp.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-check_PROGRAMS = testExp
-
-TESTS = testExp
-
-testExp_SOURCES = testExp.c
-testExp_CFLAGS = $(check_INCLUDES)
-testExp_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/exp/libExp.la \
- @LIBMATH@ \ No newline at end of file
+ @LIBMATH@
+
+check_PROGRAMS = testFloatExp testDoubleExp
+
+TESTS = testFloatExp testDoubleExp
+
+testFloatExp_SOURCES = testFloatExp.c
+testFloatExp_CFLAGS = $(check_INCLUDES)
+testFloatExp_LDADD = $(check_LDADD)
+
+testDoubleExp_SOURCES = testDoubleExp.c
+testDoubleExp_CFLAGS = $(check_INCLUDES)
+testDoubleExp_LDADD = $(check_LDADD)
diff --git a/src/elementaryFunctions/exp/Makefile.in b/src/elementaryFunctions/exp/Makefile.in
index 5bd075ca..0a7c51b1 100644
--- a/src/elementaryFunctions/exp/Makefile.in
+++ b/src/elementaryFunctions/exp/Makefile.in
@@ -32,8 +32,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = testExp$(EXEEXT)
-TESTS = testExp$(EXEEXT)
+check_PROGRAMS = testFloatExp$(EXEEXT) testDoubleExp$(EXEEXT)
+TESTS = testFloatExp$(EXEEXT) testDoubleExp$(EXEEXT)
subdir = elementaryFunctions/exp
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -62,18 +62,25 @@ libExp_la_OBJECTS = $(am_libExp_la_OBJECTS)
libExp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libExp_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_testExp_OBJECTS = testExp-testExp.$(OBJEXT)
-testExp_OBJECTS = $(am_testExp_OBJECTS)
-testExp_DEPENDENCIES = $(top_builddir)/type/libDoubleComplex.la \
+am_testDoubleExp_OBJECTS = testDoubleExp-testDoubleExp.$(OBJEXT)
+testDoubleExp_OBJECTS = $(am_testDoubleExp_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/exp/libExp.la
-testExp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(testExp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+testDoubleExp_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testDoubleExp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleExp_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatExp_OBJECTS = testFloatExp-testFloatExp.$(OBJEXT)
+testFloatExp_OBJECTS = $(am_testFloatExp_OBJECTS)
+testFloatExp_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testFloatExp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatExp_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
@@ -86,8 +93,10 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(libExp_la_SOURCES) $(testExp_SOURCES)
-DIST_SOURCES = $(libExp_la_SOURCES) $(testExp_SOURCES)
+SOURCES = $(libExp_la_SOURCES) $(testDoubleExp_SOURCES) \
+ $(testFloatExp_SOURCES)
+DIST_SOURCES = $(libExp_la_SOURCES) $(testDoubleExp_SOURCES) \
+ $(testFloatExp_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -222,9 +231,7 @@ HEAD = ../includes/exp.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-testExp_SOURCES = testExp.c
-testExp_CFLAGS = $(check_INCLUDES)
-testExp_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 \
@@ -233,6 +240,12 @@ testExp_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/elementaryFunctions/exp/libExp.la \
@LIBMATH@
+testFloatExp_SOURCES = testFloatExp.c
+testFloatExp_CFLAGS = $(check_INCLUDES)
+testFloatExp_LDADD = $(check_LDADD)
+testDoubleExp_SOURCES = testDoubleExp.c
+testDoubleExp_CFLAGS = $(check_INCLUDES)
+testDoubleExp_LDADD = $(check_LDADD)
all: all-am
.SUFFIXES:
@@ -302,9 +315,12 @@ clean-checkPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
-testExp$(EXEEXT): $(testExp_OBJECTS) $(testExp_DEPENDENCIES)
- @rm -f testExp$(EXEEXT)
- $(testExp_LINK) $(testExp_OBJECTS) $(testExp_LDADD) $(LIBS)
+testDoubleExp$(EXEEXT): $(testDoubleExp_OBJECTS) $(testDoubleExp_DEPENDENCIES)
+ @rm -f testDoubleExp$(EXEEXT)
+ $(testDoubleExp_LINK) $(testDoubleExp_OBJECTS) $(testDoubleExp_LDADD) $(LIBS)
+testFloatExp$(EXEEXT): $(testFloatExp_OBJECTS) $(testFloatExp_DEPENDENCIES)
+ @rm -f testFloatExp$(EXEEXT)
+ $(testFloatExp_LINK) $(testFloatExp_OBJECTS) $(testFloatExp_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -320,7 +336,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-sexps.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-zexpa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-zexps.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testExp-testExp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleExp-testDoubleExp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatExp-testFloatExp.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -399,19 +416,33 @@ libExp_la-zexpa.lo: zexpa.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) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-zexpa.lo `test -f 'zexpa.c' || echo '$(srcdir)/'`zexpa.c
-testExp-testExp.o: testExp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testExp_CFLAGS) $(CFLAGS) -MT testExp-testExp.o -MD -MP -MF $(DEPDIR)/testExp-testExp.Tpo -c -o testExp-testExp.o `test -f 'testExp.c' || echo '$(srcdir)/'`testExp.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testExp-testExp.Tpo $(DEPDIR)/testExp-testExp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testExp.c' object='testExp-testExp.o' libtool=no @AMDEPBACKSLASH@
+testDoubleExp-testDoubleExp.o: testDoubleExp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp_CFLAGS) $(CFLAGS) -MT testDoubleExp-testDoubleExp.o -MD -MP -MF $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo -c -o testDoubleExp-testDoubleExp.o `test -f 'testDoubleExp.c' || echo '$(srcdir)/'`testDoubleExp.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo $(DEPDIR)/testDoubleExp-testDoubleExp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp.c' object='testDoubleExp-testDoubleExp.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) $(testDoubleExp_CFLAGS) $(CFLAGS) -c -o testDoubleExp-testDoubleExp.o `test -f 'testDoubleExp.c' || echo '$(srcdir)/'`testDoubleExp.c
+
+testDoubleExp-testDoubleExp.obj: testDoubleExp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp_CFLAGS) $(CFLAGS) -MT testDoubleExp-testDoubleExp.obj -MD -MP -MF $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo -c -o testDoubleExp-testDoubleExp.obj `if test -f 'testDoubleExp.c'; then $(CYGPATH_W) 'testDoubleExp.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo $(DEPDIR)/testDoubleExp-testDoubleExp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp.c' object='testDoubleExp-testDoubleExp.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) $(testDoubleExp_CFLAGS) $(CFLAGS) -c -o testDoubleExp-testDoubleExp.obj `if test -f 'testDoubleExp.c'; then $(CYGPATH_W) 'testDoubleExp.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp.c'; fi`
+
+testFloatExp-testFloatExp.o: testFloatExp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -MT testFloatExp-testFloatExp.o -MD -MP -MF $(DEPDIR)/testFloatExp-testFloatExp.Tpo -c -o testFloatExp-testFloatExp.o `test -f 'testFloatExp.c' || echo '$(srcdir)/'`testFloatExp.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatExp-testFloatExp.Tpo $(DEPDIR)/testFloatExp-testFloatExp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp.c' object='testFloatExp-testFloatExp.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) $(testExp_CFLAGS) $(CFLAGS) -c -o testExp-testExp.o `test -f 'testExp.c' || echo '$(srcdir)/'`testExp.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -c -o testFloatExp-testFloatExp.o `test -f 'testFloatExp.c' || echo '$(srcdir)/'`testFloatExp.c
-testExp-testExp.obj: testExp.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testExp_CFLAGS) $(CFLAGS) -MT testExp-testExp.obj -MD -MP -MF $(DEPDIR)/testExp-testExp.Tpo -c -o testExp-testExp.obj `if test -f 'testExp.c'; then $(CYGPATH_W) 'testExp.c'; else $(CYGPATH_W) '$(srcdir)/testExp.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testExp-testExp.Tpo $(DEPDIR)/testExp-testExp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testExp.c' object='testExp-testExp.obj' libtool=no @AMDEPBACKSLASH@
+testFloatExp-testFloatExp.obj: testFloatExp.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -MT testFloatExp-testFloatExp.obj -MD -MP -MF $(DEPDIR)/testFloatExp-testFloatExp.Tpo -c -o testFloatExp-testFloatExp.obj `if test -f 'testFloatExp.c'; then $(CYGPATH_W) 'testFloatExp.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatExp-testFloatExp.Tpo $(DEPDIR)/testFloatExp-testFloatExp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp.c' object='testFloatExp-testFloatExp.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) $(testExp_CFLAGS) $(CFLAGS) -c -o testExp-testExp.obj `if test -f 'testExp.c'; then $(CYGPATH_W) 'testExp.c'; else $(CYGPATH_W) '$(srcdir)/testExp.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -c -o testFloatExp-testFloatExp.obj `if test -f 'testFloatExp.c'; then $(CYGPATH_W) 'testFloatExp.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
diff --git a/src/elementaryFunctions/exp/sexps.c b/src/elementaryFunctions/exp/sexps.c
index 086f7eb0..643e8873 100644
--- a/src/elementaryFunctions/exp/sexps.c
+++ b/src/elementaryFunctions/exp/sexps.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** sexps.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:46:01 2007 jofret
-**
-** 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 "exp.h"
float sexps(float x) {
- return (exp(x));
+ return (expf(x));
}
diff --git a/src/elementaryFunctions/exp/testDoubleExp.c b/src/elementaryFunctions/exp/testDoubleExp.c
new file mode 100644
index 00000000..73aa4a8d
--- /dev/null
+++ b/src/elementaryFunctions/exp/testDoubleExp.c
@@ -0,0 +1,46 @@
+/*
+ * 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 "testExp.h"
+
+void dexpsTest(void) {
+ /* FIXME : Implement some test here ... */
+ printf(">> Double scalar\n");
+ printf("dexps(0) = %e\n", dexps(0.0));
+ printf("dexps(PI) = %e\n", dexps(DPI));
+ printf("dexps(PI/2) = %e\n", dexps(DPI/2));
+ printf("dexps(PI/3) = %e\n", dexps(DPI/3));
+ printf("dexps(PI/4) = %e\n", dexps(DPI/4));
+ printf("dexps(PI/6) = %e\n", dexps(DPI/6));
+ printf("dexps(-PI) = %e\n", dexps(-DPI));
+ printf("dexps(-PI/2) = %e\n", dexps(-DPI/2));
+ printf("dexps(-PI/3) = %e\n", dexps(-DPI/3));
+ printf("dexps(-PI/4) = %e\n", dexps(-DPI/4));
+ printf("dexps(-PI/6) = %e\n", dexps(-DPI/6));
+}
+
+int testExp(void) {
+ printf("\n>>>> Double Exponential Tests\n");
+ dexpsTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ zexpsTest();
+ dexpaTest();
+ zexpaTest();
+ */
+ return 0;
+}
+
+int main(void) {
+ assert(testExp() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/exp/testExp.c b/src/elementaryFunctions/exp/testExp.c
deleted file mode 100644
index 7ad75191..00000000
--- a/src/elementaryFunctions/exp/testExp.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-** -*- C -*-
-**
-** testExp.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Wed Apr 18 17:11:29 2007 jofret
-**
-** Copyright INRIA 2006
-*/
-
-#include "testExp.h"
-
-#define PI 3.1415826535
-
-void sexpsTest(void) {
- printf(">> Float scalar\n");
- printf("sexps(0) = %f\n", sexps((float) 0));
- printf("sexps(PI) = %f\n", sexps(PI));
- printf("sexps(PI/2) = %f\n", sexps(PI/2));
- printf("sexps(PI/3) = %f\n", sexps(PI/3));
- printf("sexps(PI/4) = %f\n", sexps(PI/4));
- printf("sexps(PI/6) = %f\n", sexps(PI/6));
- printf("sexps(-PI) = %f\n", sexps(-PI));
- printf("sexps(-PI/2) = %f\n", sexps(-PI/2));
- printf("sexps(-PI/3) = %f\n", sexps(-PI/3));
- printf("sexps(-PI/4) = %f\n", sexps(-PI/4));
- printf("sexps(-PI/6) = %f\n", sexps(-PI/6));
-}
-
-void dexpsTest(void) {
- printf(">> Double scalar\n");
- printf("dexps(0) = %e\n", dexps((double) 0));
- printf("dexps(PI) = %e\n", dexps(PI));
- printf("dexps(PI/2) = %e\n", dexps(PI/2));
- printf("dexps(PI/3) = %e\n", dexps(PI/3));
- printf("dexps(PI/4) = %e\n", dexps(PI/4));
- printf("dexps(PI/6) = %e\n", dexps(PI/6));
- printf("dexps(-PI) = %e\n", dexps(-PI));
- printf("dexps(-PI/2) = %e\n", dexps(-PI/2));
- printf("dexps(-PI/3) = %e\n", dexps(-PI/3));
- printf("dexps(-PI/4) = %e\n", dexps(-PI/4));
- printf("dexps(-PI/6) = %e\n", dexps(-PI/6));
-}
-
-int testExp(void) {
- printf("\n>>>> Exponential Tests\n");
- sexpsTest();
- dexpsTest();
- /* FIXME : Implement some test here ... */
- /*
- cexpsTest();
- zexpsTest();
- sexpaTest();
- dexpaTest();
- cexpaTest();
- zexpaTest();
- */
- return 0;
-}
-
-int main(void) {
- assert(testExp() == 0);
- return 0;
-}
diff --git a/src/elementaryFunctions/exp/testFloatExp.c b/src/elementaryFunctions/exp/testFloatExp.c
new file mode 100644
index 00000000..56b94901
--- /dev/null
+++ b/src/elementaryFunctions/exp/testFloatExp.c
@@ -0,0 +1,46 @@
+/*
+ * 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 "testExp.h"
+
+void sexpsTest(void) {
+ /* FIXME : add some tests there */
+ printf(">> Float scalar\n");
+ printf("sexps(0) = %f\n", sexps(0.0f));
+ printf("sexps(PI) = %f\n", sexps(FPI));
+ printf("sexps(PI/2) = %f\n", sexps(FPI/2));
+ printf("sexps(PI/3) = %f\n", sexps(FPI/3));
+ printf("sexps(PI/4) = %f\n", sexps(FPI/4));
+ printf("sexps(PI/6) = %f\n", sexps(FPI/6));
+ printf("sexps(-PI) = %f\n", sexps(-FPI));
+ printf("sexps(-PI/2) = %f\n", sexps(-FPI/2));
+ printf("sexps(-PI/3) = %f\n", sexps(-FPI/3));
+ printf("sexps(-PI/4) = %f\n", sexps(-FPI/4));
+ printf("sexps(-PI/6) = %f\n", sexps(-FPI/6));
+}
+
+int testExp(void) {
+ printf("\n>>>> Exponential Tests\n");
+ sexpsTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ cexpsTest();
+ sexpaTest();
+ cexpaTest();
+ */
+ return 0;
+}
+
+int main(void) {
+ assert(testExp() == 0);
+ return 0;
+}