summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/elementaryFunctions/tan/Makefile.am22
-rw-r--r--src/elementaryFunctions/tan/Makefile.in93
-rw-r--r--src/elementaryFunctions/tan/ctans.c12
-rw-r--r--src/elementaryFunctions/tan/stans.c22
-rw-r--r--src/elementaryFunctions/tan/testDoubleTan.c45
-rw-r--r--src/elementaryFunctions/tan/testFloatTan.c45
-rw-r--r--src/elementaryFunctions/tan/testTan.c64
-rw-r--r--src/elementaryFunctions/tan/ztans.c22
8 files changed, 194 insertions, 131 deletions
diff --git a/src/elementaryFunctions/tan/Makefile.am b/src/elementaryFunctions/tan/Makefile.am
index f4e6052a..e5ce210f 100644
--- a/src/elementaryFunctions/tan/Makefile.am
+++ b/src/elementaryFunctions/tan/Makefile.am
@@ -37,16 +37,22 @@ HEAD = ../includes/tan.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-check_PROGRAMS = testTan
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+ $(top_builddir)/type/libFloatComplex.la \
+ $(top_builddir)/elementaryFunctions/tan/libTan.la \
+ @LIBMATH@
+
+check_PROGRAMS = testFloatTan testDoubleTan
-TESTS = testTan
+TESTS = testFloatTan testDoubleTan
#
# -*- Tangeant Tests -*-
#
-testTan_SOURCES = testTan.c
-testTan_CFLAGS = $(check_INCLUDES)
-testTan_LDADD = $(top_builddir)/type/libDoubleComplex.la \
- $(top_builddir)/type/libFloatComplex.la \
- $(top_builddir)/elementaryFunctions/tan/libTan.la \
- @LIBMATH@
+testFloatTan_SOURCES = testFloatTan.c
+testFloatTan_CFLAGS = $(check_INCLUDES)
+testFloatTan_LDADD = $(check_LDADD)
+
+testDoubleTan_SOURCES = testDoubleTan.c
+testDoubleTan_CFLAGS = $(check_INCLUDES)
+testDoubleTan_LDADD = $(check_LDADD)
diff --git a/src/elementaryFunctions/tan/Makefile.in b/src/elementaryFunctions/tan/Makefile.in
index d264a14a..1e867f3e 100644
--- a/src/elementaryFunctions/tan/Makefile.in
+++ b/src/elementaryFunctions/tan/Makefile.in
@@ -32,8 +32,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = testTan$(EXEEXT)
-TESTS = testTan$(EXEEXT)
+check_PROGRAMS = testFloatTan$(EXEEXT) testDoubleTan$(EXEEXT)
+TESTS = testFloatTan$(EXEEXT) testDoubleTan$(EXEEXT)
subdir = elementaryFunctions/tan
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -62,14 +62,21 @@ libTan_la_OBJECTS = $(am_libTan_la_OBJECTS)
libTan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libTan_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_testTan_OBJECTS = testTan-testTan.$(OBJEXT)
-testTan_OBJECTS = $(am_testTan_OBJECTS)
-testTan_DEPENDENCIES = $(top_builddir)/type/libDoubleComplex.la \
+am_testDoubleTan_OBJECTS = testDoubleTan-testDoubleTan.$(OBJEXT)
+testDoubleTan_OBJECTS = $(am_testDoubleTan_OBJECTS)
+am__DEPENDENCIES_1 = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/tan/libTan.la
-testTan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(testTan_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+testDoubleTan_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testDoubleTan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleTan_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatTan_OBJECTS = testFloatTan-testFloatTan.$(OBJEXT)
+testFloatTan_OBJECTS = $(am_testFloatTan_OBJECTS)
+testFloatTan_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testFloatTan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatTan_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
@@ -82,8 +89,10 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(libTan_la_SOURCES) $(testTan_SOURCES)
-DIST_SOURCES = $(libTan_la_SOURCES) $(testTan_SOURCES)
+SOURCES = $(libTan_la_SOURCES) $(testDoubleTan_SOURCES) \
+ $(testFloatTan_SOURCES)
+DIST_SOURCES = $(libTan_la_SOURCES) $(testDoubleTan_SOURCES) \
+ $(testFloatTan_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -218,17 +227,21 @@ HEAD = ../includes/tan.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-
-#
-# -*- Tangeant Tests -*-
-#
-testTan_SOURCES = testTan.c
-testTan_CFLAGS = $(check_INCLUDES)
-testTan_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/tan/libTan.la \
@LIBMATH@
+
+#
+# -*- Tangeant Tests -*-
+#
+testFloatTan_SOURCES = testFloatTan.c
+testFloatTan_CFLAGS = $(check_INCLUDES)
+testFloatTan_LDADD = $(check_LDADD)
+testDoubleTan_SOURCES = testDoubleTan.c
+testDoubleTan_CFLAGS = $(check_INCLUDES)
+testDoubleTan_LDADD = $(check_LDADD)
all: all-am
.SUFFIXES:
@@ -298,9 +311,12 @@ clean-checkPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
-testTan$(EXEEXT): $(testTan_OBJECTS) $(testTan_DEPENDENCIES)
- @rm -f testTan$(EXEEXT)
- $(testTan_LINK) $(testTan_OBJECTS) $(testTan_LDADD) $(LIBS)
+testDoubleTan$(EXEEXT): $(testDoubleTan_OBJECTS) $(testDoubleTan_DEPENDENCIES)
+ @rm -f testDoubleTan$(EXEEXT)
+ $(testDoubleTan_LINK) $(testDoubleTan_OBJECTS) $(testDoubleTan_LDADD) $(LIBS)
+testFloatTan$(EXEEXT): $(testFloatTan_OBJECTS) $(testFloatTan_DEPENDENCIES)
+ @rm -f testFloatTan$(EXEEXT)
+ $(testFloatTan_LINK) $(testFloatTan_OBJECTS) $(testFloatTan_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -316,7 +332,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-stans.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-ztana.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-ztans.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testTan-testTan.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleTan-testDoubleTan.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatTan-testFloatTan.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -395,19 +412,33 @@ libTan_la-ztana.lo: ztana.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) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-ztana.lo `test -f 'ztana.c' || echo '$(srcdir)/'`ztana.c
-testTan-testTan.o: testTan.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testTan_CFLAGS) $(CFLAGS) -MT testTan-testTan.o -MD -MP -MF $(DEPDIR)/testTan-testTan.Tpo -c -o testTan-testTan.o `test -f 'testTan.c' || echo '$(srcdir)/'`testTan.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testTan-testTan.Tpo $(DEPDIR)/testTan-testTan.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testTan.c' object='testTan-testTan.o' libtool=no @AMDEPBACKSLASH@
+testDoubleTan-testDoubleTan.o: testDoubleTan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTan_CFLAGS) $(CFLAGS) -MT testDoubleTan-testDoubleTan.o -MD -MP -MF $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo -c -o testDoubleTan-testDoubleTan.o `test -f 'testDoubleTan.c' || echo '$(srcdir)/'`testDoubleTan.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo $(DEPDIR)/testDoubleTan-testDoubleTan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTan.c' object='testDoubleTan-testDoubleTan.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) $(testDoubleTan_CFLAGS) $(CFLAGS) -c -o testDoubleTan-testDoubleTan.o `test -f 'testDoubleTan.c' || echo '$(srcdir)/'`testDoubleTan.c
+
+testDoubleTan-testDoubleTan.obj: testDoubleTan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTan_CFLAGS) $(CFLAGS) -MT testDoubleTan-testDoubleTan.obj -MD -MP -MF $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo -c -o testDoubleTan-testDoubleTan.obj `if test -f 'testDoubleTan.c'; then $(CYGPATH_W) 'testDoubleTan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTan.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo $(DEPDIR)/testDoubleTan-testDoubleTan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTan.c' object='testDoubleTan-testDoubleTan.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) $(testDoubleTan_CFLAGS) $(CFLAGS) -c -o testDoubleTan-testDoubleTan.obj `if test -f 'testDoubleTan.c'; then $(CYGPATH_W) 'testDoubleTan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTan.c'; fi`
+
+testFloatTan-testFloatTan.o: testFloatTan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -MT testFloatTan-testFloatTan.o -MD -MP -MF $(DEPDIR)/testFloatTan-testFloatTan.Tpo -c -o testFloatTan-testFloatTan.o `test -f 'testFloatTan.c' || echo '$(srcdir)/'`testFloatTan.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatTan-testFloatTan.Tpo $(DEPDIR)/testFloatTan-testFloatTan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTan.c' object='testFloatTan-testFloatTan.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) $(testTan_CFLAGS) $(CFLAGS) -c -o testTan-testTan.o `test -f 'testTan.c' || echo '$(srcdir)/'`testTan.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -c -o testFloatTan-testFloatTan.o `test -f 'testFloatTan.c' || echo '$(srcdir)/'`testFloatTan.c
-testTan-testTan.obj: testTan.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testTan_CFLAGS) $(CFLAGS) -MT testTan-testTan.obj -MD -MP -MF $(DEPDIR)/testTan-testTan.Tpo -c -o testTan-testTan.obj `if test -f 'testTan.c'; then $(CYGPATH_W) 'testTan.c'; else $(CYGPATH_W) '$(srcdir)/testTan.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testTan-testTan.Tpo $(DEPDIR)/testTan-testTan.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testTan.c' object='testTan-testTan.obj' libtool=no @AMDEPBACKSLASH@
+testFloatTan-testFloatTan.obj: testFloatTan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -MT testFloatTan-testFloatTan.obj -MD -MP -MF $(DEPDIR)/testFloatTan-testFloatTan.Tpo -c -o testFloatTan-testFloatTan.obj `if test -f 'testFloatTan.c'; then $(CYGPATH_W) 'testFloatTan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTan.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatTan-testFloatTan.Tpo $(DEPDIR)/testFloatTan-testFloatTan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTan.c' object='testFloatTan-testFloatTan.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) $(testTan_CFLAGS) $(CFLAGS) -c -o testTan-testTan.obj `if test -f 'testTan.c'; then $(CYGPATH_W) 'testTan.c'; else $(CYGPATH_W) '$(srcdir)/testTan.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -c -o testFloatTan-testFloatTan.obj `if test -f 'testFloatTan.c'; then $(CYGPATH_W) 'testFloatTan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTan.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
diff --git a/src/elementaryFunctions/tan/ctans.c b/src/elementaryFunctions/tan/ctans.c
index e0c4153d..ee3396f1 100644
--- a/src/elementaryFunctions/tan/ctans.c
+++ b/src/elementaryFunctions/tan/ctans.c
@@ -12,20 +12,20 @@
#include "tan.h"
/*
- #include "log.h"
+ #include "log.h"
*/
#include "sqrt.h"
/*
- #include "lapack.h"
+ #include "lapack.h"
*/
floatComplex ctans(floatComplex z) {
-
- double out_real = 0;
- double out_imag = 0;
/*
+
+ double out_real = 0;
+ double out_imag = 0;
double L = 1 + dlogs(2 / dsqrts(dlamch('e', 1)));
*/
- return FloatComplex(out_real, out_imag);
+ return z;
}
diff --git a/src/elementaryFunctions/tan/stans.c b/src/elementaryFunctions/tan/stans.c
index 7694a300..436c32e4 100644
--- a/src/elementaryFunctions/tan/stans.c
+++ b/src/elementaryFunctions/tan/stans.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** stans.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:40:05 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 "tan.h"
float stans(float x) {
- return (tan(x));
+ return (tanf(x));
}
diff --git a/src/elementaryFunctions/tan/testDoubleTan.c b/src/elementaryFunctions/tan/testDoubleTan.c
new file mode 100644
index 00000000..970ef0c7
--- /dev/null
+++ b/src/elementaryFunctions/tan/testDoubleTan.c
@@ -0,0 +1,45 @@
+/*
+ * 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 "testTan.h"
+
+void dtansTest() {
+ printf(">> Double scalar\n");
+ printf("dtans(0) = %e\n", dtans(0.0));
+ printf("dtans(PI) = %e\n", dtans(DPI));
+ printf("dtans(PI/2) = %e\n", dtans(DPI/2));
+ printf("dtans(PI/3) = %e\n", dtans(DPI/3));
+ printf("dtans(PI/4) = %e\n", dtans(DPI/4));
+ printf("dtans(PI/6) = %e\n", dtans(DPI/6));
+ printf("dtans(-PI) = %e\n", dtans(-DPI));
+ printf("dtans(-PI/2) = %e\n", dtans(-DPI/2));
+ printf("dtans(-PI/3) = %e\n", dtans(-DPI/3));
+ printf("dtans(-PI/4) = %e\n", dtans(-DPI/4));
+ printf("dtans(-PI/6) = %e\n", dtans(-DPI/6));
+}
+
+int testTan() {
+ printf("\n>>>> Double Tangeant Tests\n");
+ dtansTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ ztansTest();
+ dtanaTest();
+ ztanaTest();
+ */
+ return 0;
+}
+
+int main() {
+ assert(testTan() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/tan/testFloatTan.c b/src/elementaryFunctions/tan/testFloatTan.c
new file mode 100644
index 00000000..6f727a14
--- /dev/null
+++ b/src/elementaryFunctions/tan/testFloatTan.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 "testTan.h"
+
+void stansTest() {
+ printf(">> Float scalar\n");
+ printf("stans(0) = %f\n", stans(0.0f));
+ printf("stans(PI) = %f\n", stans(FPI));
+ printf("stans(PI/2) = %f\n", stans(FPI/2));
+ printf("stans(PI/3) = %f\n", stans(FPI/3));
+ printf("stans(PI/4) = %f\n", stans(FPI/4));
+ printf("stans(PI/6) = %f\n", stans(FPI/6));
+ printf("stans(-PI) = %f\n", stans(-FPI));
+ printf("stans(-PI/2) = %f\n", stans(-FPI/2));
+ printf("stans(-PI/3) = %f\n", stans(-FPI/3));
+ printf("stans(-PI/4) = %f\n", stans(-FPI/4));
+ printf("stans(-PI/6) = %f\n", stans(-FPI/6));
+}
+
+int testTan() {
+ printf("\n>>>> Float Tangeant Tests\n");
+ stansTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ ctansTest();
+ stanaTest();
+ ctanaTest();
+ */
+ return 0;
+}
+
+int main() {
+ assert(testTan() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/tan/testTan.c b/src/elementaryFunctions/tan/testTan.c
deleted file mode 100644
index 9200d3bb..00000000
--- a/src/elementaryFunctions/tan/testTan.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-** -*- C -*-
-**
-** testTan.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Fri Mar 30 11:24:54 2007 jofret
-**
-** Copyright INRIA 2006
-*/
-
-#include "testTan.h"
-
-void stansTest() {
- printf(">> Float scalar\n");
- printf("stans(0) = %f\n", stans((float) 0));
- printf("stans(PI) = %f\n", stans(PI));
- printf("stans(PI/2) = %f\n", stans(PI/2));
- printf("stans(PI/3) = %f\n", stans(PI/3));
- printf("stans(PI/4) = %f\n", stans(PI/4));
- printf("stans(PI/6) = %f\n", stans(PI/6));
- printf("stans(-PI) = %f\n", stans(-PI));
- printf("stans(-PI/2) = %f\n", stans(-PI/2));
- printf("stans(-PI/3) = %f\n", stans(-PI/3));
- printf("stans(-PI/4) = %f\n", stans(-PI/4));
- printf("stans(-PI/6) = %f\n", stans(-PI/6));
-}
-
-void dtansTest() {
- printf(">> Double scalar\n");
- printf("dtans(0) = %e\n", dtans((double) 0));
- printf("dtans(PI) = %e\n", dtans(PI));
- printf("dtans(PI/2) = %e\n", dtans(PI/2));
- printf("dtans(PI/3) = %e\n", dtans(PI/3));
- printf("dtans(PI/4) = %e\n", dtans(PI/4));
- printf("dtans(PI/6) = %e\n", dtans(PI/6));
- printf("dtans(-PI) = %e\n", dtans(-PI));
- printf("dtans(-PI/2) = %e\n", dtans(-PI/2));
- printf("dtans(-PI/3) = %e\n", dtans(-PI/3));
- printf("dtans(-PI/4) = %e\n", dtans(-PI/4));
- printf("dtans(-PI/6) = %e\n", dtans(-PI/6));
-}
-
-int testTan() {
- printf("\n>>>> Tangeant Tests\n");
- stansTest();
- dtansTest();
- /* FIXME : Implement some test here ... */
- /*
- ctansTest();
- ztansTest();
- stanaTest();
- dtanaTest();
- ctanaTest();
- ztanaTest();
- */
- return 0;
-}
-
-int main() {
- assert(testTan() == 0);
- return 0;
-}
diff --git a/src/elementaryFunctions/tan/ztans.c b/src/elementaryFunctions/tan/ztans.c
index e2cfe2b0..0065ea0d 100644
--- a/src/elementaryFunctions/tan/ztans.c
+++ b/src/elementaryFunctions/tan/ztans.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** ztans.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Dec 7 12:05:48 2006 jofret
-** Last update Fri Feb 23 17:25: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 "tan.h"
doubleComplex ztans(doubleComplex z) {
/* FIXME: Dummy... */
- return (DoubleComplex(0,1));
+ return z;
}