summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2008-04-18 15:01:47 +0000
committerjofret2008-04-18 15:01:47 +0000
commit68eb0059d5b46791326e4e7625604da189b86e3d (patch)
treeecaab8947cbf731a78e2917f2602078b3a90605a
parent75e0319a0cea635ed67524d7753eac145b24614c (diff)
downloadscilab2c-68eb0059d5b46791326e4e7625604da189b86e3d.tar.gz
scilab2c-68eb0059d5b46791326e4e7625604da189b86e3d.tar.bz2
scilab2c-68eb0059d5b46791326e4e7625604da189b86e3d.zip
Double vs Float better management. Enable psycho warnings.
-rw-r--r--src/elementaryFunctions/atan/Makefile.am24
-rw-r--r--src/elementaryFunctions/atan/Makefile.in93
-rw-r--r--src/elementaryFunctions/atan/catans.c26
-rw-r--r--src/elementaryFunctions/atan/satans.c22
-rw-r--r--src/elementaryFunctions/atan/testAtan.c64
-rw-r--r--src/elementaryFunctions/atan/testDoubleAtan.c45
-rw-r--r--src/elementaryFunctions/atan/testFloatAtan.c45
-rw-r--r--src/elementaryFunctions/atan/zatans.c22
8 files changed, 200 insertions, 141 deletions
diff --git a/src/elementaryFunctions/atan/Makefile.am b/src/elementaryFunctions/atan/Makefile.am
index 28ab854e..07208ce6 100644
--- a/src/elementaryFunctions/atan/Makefile.am
+++ b/src/elementaryFunctions/atan/Makefile.am
@@ -37,16 +37,22 @@ HEAD = ../includes/atan.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-check_PROGRAMS = testAtan
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+ $(top_builddir)/type/libFloatComplex.la \
+ $(top_builddir)/elementaryFunctions/atan/libAtan.la \
+ @LIBMATH@
+
+check_PROGRAMS = testFloatAtan testDoubleAtan
-TESTS = testAtan
+TESTS = testFloatAtan testDoubleAtan
#
-# -*- Atangeant Tests -*-
+# -*- Arc tangeant Tests -*-
#
-testAtan_SOURCES = testAtan.c
-testAtan_CFLAGS = $(check_INCLUDES)
-testAtan_LDADD = $(top_builddir)/type/libDoubleComplex.la \
- $(top_builddir)/type/libFloatComplex.la \
- $(top_builddir)/elementaryFunctions/atan/libAtan.la \
- @LIBMATH@
+testFloatAtan_SOURCES = testFloatAtan.c
+testFloatAtan_CFLAGS = $(check_INCLUDES)
+testFloatAtan_LDADD = $(check_LDADD)
+
+testDoubleAtan_SOURCES = testDoubleAtan.c
+testDoubleAtan_CFLAGS = $(check_INCLUDES)
+testDoubleAtan_LDADD = $(check_LDADD)
diff --git a/src/elementaryFunctions/atan/Makefile.in b/src/elementaryFunctions/atan/Makefile.in
index 76311ed8..f99707a8 100644
--- a/src/elementaryFunctions/atan/Makefile.in
+++ b/src/elementaryFunctions/atan/Makefile.in
@@ -32,8 +32,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = testAtan$(EXEEXT)
-TESTS = testAtan$(EXEEXT)
+check_PROGRAMS = testFloatAtan$(EXEEXT) testDoubleAtan$(EXEEXT)
+TESTS = testFloatAtan$(EXEEXT) testDoubleAtan$(EXEEXT)
subdir = elementaryFunctions/atan
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -62,14 +62,21 @@ libAtan_la_OBJECTS = $(am_libAtan_la_OBJECTS)
libAtan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAtan_la_CFLAGS) \
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_testAtan_OBJECTS = testAtan-testAtan.$(OBJEXT)
-testAtan_OBJECTS = $(am_testAtan_OBJECTS)
-testAtan_DEPENDENCIES = $(top_builddir)/type/libDoubleComplex.la \
+am_testDoubleAtan_OBJECTS = testDoubleAtan-testDoubleAtan.$(OBJEXT)
+testDoubleAtan_OBJECTS = $(am_testDoubleAtan_OBJECTS)
+am__DEPENDENCIES_1 = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/atan/libAtan.la
-testAtan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(testAtan_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+testDoubleAtan_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testDoubleAtan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAtan_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_testFloatAtan_OBJECTS = testFloatAtan-testFloatAtan.$(OBJEXT)
+testFloatAtan_OBJECTS = $(am_testFloatAtan_OBJECTS)
+testFloatAtan_DEPENDENCIES = $(am__DEPENDENCIES_1)
+testFloatAtan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAtan_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 = $(libAtan_la_SOURCES) $(testAtan_SOURCES)
-DIST_SOURCES = $(libAtan_la_SOURCES) $(testAtan_SOURCES)
+SOURCES = $(libAtan_la_SOURCES) $(testDoubleAtan_SOURCES) \
+ $(testFloatAtan_SOURCES)
+DIST_SOURCES = $(libAtan_la_SOURCES) $(testDoubleAtan_SOURCES) \
+ $(testFloatAtan_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -218,17 +227,21 @@ HEAD = ../includes/atan.h
check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \
-I $(top_builddir)/type
-
-#
-# -*- Atangeant Tests -*-
-#
-testAtan_SOURCES = testAtan.c
-testAtan_CFLAGS = $(check_INCLUDES)
-testAtan_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/elementaryFunctions/atan/libAtan.la \
@LIBMATH@
+
+#
+# -*- Arc tangeant Tests -*-
+#
+testFloatAtan_SOURCES = testFloatAtan.c
+testFloatAtan_CFLAGS = $(check_INCLUDES)
+testFloatAtan_LDADD = $(check_LDADD)
+testDoubleAtan_SOURCES = testDoubleAtan.c
+testDoubleAtan_CFLAGS = $(check_INCLUDES)
+testDoubleAtan_LDADD = $(check_LDADD)
all: all-am
.SUFFIXES:
@@ -298,9 +311,12 @@ clean-checkPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
-testAtan$(EXEEXT): $(testAtan_OBJECTS) $(testAtan_DEPENDENCIES)
- @rm -f testAtan$(EXEEXT)
- $(testAtan_LINK) $(testAtan_OBJECTS) $(testAtan_LDADD) $(LIBS)
+testDoubleAtan$(EXEEXT): $(testDoubleAtan_OBJECTS) $(testDoubleAtan_DEPENDENCIES)
+ @rm -f testDoubleAtan$(EXEEXT)
+ $(testDoubleAtan_LINK) $(testDoubleAtan_OBJECTS) $(testDoubleAtan_LDADD) $(LIBS)
+testFloatAtan$(EXEEXT): $(testFloatAtan_OBJECTS) $(testFloatAtan_DEPENDENCIES)
+ @rm -f testFloatAtan$(EXEEXT)
+ $(testFloatAtan_LINK) $(testFloatAtan_OBJECTS) $(testFloatAtan_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -316,7 +332,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-satans.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-zatana.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-zatans.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAtan-testAtan.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAtan-testDoubleAtan.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAtan-testFloatAtan.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -395,19 +412,33 @@ libAtan_la-zatana.lo: zatana.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) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-zatana.lo `test -f 'zatana.c' || echo '$(srcdir)/'`zatana.c
-testAtan-testAtan.o: testAtan.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAtan_CFLAGS) $(CFLAGS) -MT testAtan-testAtan.o -MD -MP -MF $(DEPDIR)/testAtan-testAtan.Tpo -c -o testAtan-testAtan.o `test -f 'testAtan.c' || echo '$(srcdir)/'`testAtan.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testAtan-testAtan.Tpo $(DEPDIR)/testAtan-testAtan.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testAtan.c' object='testAtan-testAtan.o' libtool=no @AMDEPBACKSLASH@
+testDoubleAtan-testDoubleAtan.o: testDoubleAtan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtan_CFLAGS) $(CFLAGS) -MT testDoubleAtan-testDoubleAtan.o -MD -MP -MF $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo -c -o testDoubleAtan-testDoubleAtan.o `test -f 'testDoubleAtan.c' || echo '$(srcdir)/'`testDoubleAtan.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo $(DEPDIR)/testDoubleAtan-testDoubleAtan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAtan.c' object='testDoubleAtan-testDoubleAtan.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) $(testDoubleAtan_CFLAGS) $(CFLAGS) -c -o testDoubleAtan-testDoubleAtan.o `test -f 'testDoubleAtan.c' || echo '$(srcdir)/'`testDoubleAtan.c
+
+testDoubleAtan-testDoubleAtan.obj: testDoubleAtan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtan_CFLAGS) $(CFLAGS) -MT testDoubleAtan-testDoubleAtan.obj -MD -MP -MF $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo -c -o testDoubleAtan-testDoubleAtan.obj `if test -f 'testDoubleAtan.c'; then $(CYGPATH_W) 'testDoubleAtan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAtan.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo $(DEPDIR)/testDoubleAtan-testDoubleAtan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAtan.c' object='testDoubleAtan-testDoubleAtan.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) $(testDoubleAtan_CFLAGS) $(CFLAGS) -c -o testDoubleAtan-testDoubleAtan.obj `if test -f 'testDoubleAtan.c'; then $(CYGPATH_W) 'testDoubleAtan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAtan.c'; fi`
+
+testFloatAtan-testFloatAtan.o: testFloatAtan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -MT testFloatAtan-testFloatAtan.o -MD -MP -MF $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo -c -o testFloatAtan-testFloatAtan.o `test -f 'testFloatAtan.c' || echo '$(srcdir)/'`testFloatAtan.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo $(DEPDIR)/testFloatAtan-testFloatAtan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAtan.c' object='testFloatAtan-testFloatAtan.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) $(testAtan_CFLAGS) $(CFLAGS) -c -o testAtan-testAtan.o `test -f 'testAtan.c' || echo '$(srcdir)/'`testAtan.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -c -o testFloatAtan-testFloatAtan.o `test -f 'testFloatAtan.c' || echo '$(srcdir)/'`testFloatAtan.c
-testAtan-testAtan.obj: testAtan.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAtan_CFLAGS) $(CFLAGS) -MT testAtan-testAtan.obj -MD -MP -MF $(DEPDIR)/testAtan-testAtan.Tpo -c -o testAtan-testAtan.obj `if test -f 'testAtan.c'; then $(CYGPATH_W) 'testAtan.c'; else $(CYGPATH_W) '$(srcdir)/testAtan.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testAtan-testAtan.Tpo $(DEPDIR)/testAtan-testAtan.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testAtan.c' object='testAtan-testAtan.obj' libtool=no @AMDEPBACKSLASH@
+testFloatAtan-testFloatAtan.obj: testFloatAtan.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -MT testFloatAtan-testFloatAtan.obj -MD -MP -MF $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo -c -o testFloatAtan-testFloatAtan.obj `if test -f 'testFloatAtan.c'; then $(CYGPATH_W) 'testFloatAtan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAtan.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo $(DEPDIR)/testFloatAtan-testFloatAtan.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAtan.c' object='testFloatAtan-testFloatAtan.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) $(testAtan_CFLAGS) $(CFLAGS) -c -o testAtan-testAtan.obj `if test -f 'testAtan.c'; then $(CYGPATH_W) 'testAtan.c'; else $(CYGPATH_W) '$(srcdir)/testAtan.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -c -o testFloatAtan-testFloatAtan.obj `if test -f 'testFloatAtan.c'; then $(CYGPATH_W) 'testFloatAtan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAtan.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
diff --git a/src/elementaryFunctions/atan/catans.c b/src/elementaryFunctions/atan/catans.c
index 40a8e566..ba5fdc2f 100644
--- a/src/elementaryFunctions/atan/catans.c
+++ b/src/elementaryFunctions/atan/catans.c
@@ -1,22 +1,18 @@
/*
-** -*- C -*-
-**
-** catans.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Dec 7 12:04:28 2006 jofret
-** Last update Thu Sep 6 11:55:18 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 "atan.h"
floatComplex catans(floatComplex z) {
-
- double out_real = 0;
- double out_imag = 0;
/* FIXME : Let's code... */
-
- return FloatComplex(out_real, out_imag);
+ return z;
}
diff --git a/src/elementaryFunctions/atan/satans.c b/src/elementaryFunctions/atan/satans.c
index 43f5b2a7..5c7badee 100644
--- a/src/elementaryFunctions/atan/satans.c
+++ b/src/elementaryFunctions/atan/satans.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** satans.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Dec 7 11:05:37 2006 jofret
-** Last update Thu Sep 6 11:53:39 2007 bruno
-**
-** 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 "atan.h"
float satans(float x) {
- return (atan(x));
+ return (atanf(x));
}
diff --git a/src/elementaryFunctions/atan/testAtan.c b/src/elementaryFunctions/atan/testAtan.c
deleted file mode 100644
index 17515447..00000000
--- a/src/elementaryFunctions/atan/testAtan.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-** -*- C -*-
-**
-** testAtan.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Thu Sep 6 11:53:30 2007 bruno
-**
-** Copyright INRIA 2006
-*/
-
-#include "testAtan.h"
-
-void satansTest() {
- printf(">> Float scalar\n");
- printf("satans(0) = %f\n", satans((float) 0));
- printf("satans(PI) = %f\n", satans(PI));
- printf("satans(PI/2) = %f\n", satans(PI/2));
- printf("satans(PI/3) = %f\n", satans(PI/3));
- printf("satans(PI/4) = %f\n", satans(PI/4));
- printf("satans(PI/6) = %f\n", satans(PI/6));
- printf("satans(-PI) = %f\n", satans(-PI));
- printf("satans(-PI/2) = %f\n", satans(-PI/2));
- printf("satans(-PI/3) = %f\n", satans(-PI/3));
- printf("satans(-PI/4) = %f\n", satans(-PI/4));
- printf("satans(-PI/6) = %f\n", satans(-PI/6));
-}
-
-void datansTest() {
- printf(">> Double scalar\n");
- printf("datans(0) = %e\n", datans((double) 0));
- printf("datans(PI) = %e\n", datans(PI));
- printf("datans(PI/2) = %e\n", datans(PI/2));
- printf("datans(PI/3) = %e\n", datans(PI/3));
- printf("datans(PI/4) = %e\n", datans(PI/4));
- printf("datans(PI/6) = %e\n", datans(PI/6));
- printf("datans(-PI) = %e\n", datans(-PI));
- printf("datans(-PI/2) = %e\n", datans(-PI/2));
- printf("datans(-PI/3) = %e\n", datans(-PI/3));
- printf("datans(-PI/4) = %e\n", datans(-PI/4));
- printf("datans(-PI/6) = %e\n", datans(-PI/6));
-}
-
-int testAtan() {
- printf("\n>>>> Atangeant Tests\n");
- satansTest();
- datansTest();
- /* FIXME : Implement some test here ... */
- /*
- catansTest();
- zatansTest();
- satanaTest();
- datanaTest();
- catanaTest();
- zatanaTest();
- */
- return 0;
-}
-
-int main() {
- assert(testAtan() == 0);
- return 0;
-}
diff --git a/src/elementaryFunctions/atan/testDoubleAtan.c b/src/elementaryFunctions/atan/testDoubleAtan.c
new file mode 100644
index 00000000..a22bbed5
--- /dev/null
+++ b/src/elementaryFunctions/atan/testDoubleAtan.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 "testAtan.h"
+
+void datansTest() {
+ printf(">> Double scalar\n");
+ printf("datans(0) = %e\n", datans(0.0));
+ printf("datans(PI) = %e\n", datans(DPI));
+ printf("datans(PI/2) = %e\n", datans(DPI/2));
+ printf("datans(PI/3) = %e\n", datans(DPI/3));
+ printf("datans(PI/4) = %e\n", datans(DPI/4));
+ printf("datans(PI/6) = %e\n", datans(DPI/6));
+ printf("datans(-PI) = %e\n", datans(-DPI));
+ printf("datans(-PI/2) = %e\n", datans(-DPI/2));
+ printf("datans(-PI/3) = %e\n", datans(-DPI/3));
+ printf("datans(-PI/4) = %e\n", datans(-DPI/4));
+ printf("datans(-PI/6) = %e\n", datans(-DPI/6));
+}
+
+int testAtan() {
+ printf("\n>>>> Double Arc Tangeant Tests\n");
+ datansTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ zatansTest();
+ datanaTest();
+ zatanaTest();
+ */
+ return 0;
+}
+
+int main() {
+ assert(testAtan() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/atan/testFloatAtan.c b/src/elementaryFunctions/atan/testFloatAtan.c
new file mode 100644
index 00000000..b6724491
--- /dev/null
+++ b/src/elementaryFunctions/atan/testFloatAtan.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 "testAtan.h"
+
+void satansTest() {
+ printf(">> Float scalar\n");
+ printf("satans(0) = %f\n", satans(0.0f));
+ printf("satans(PI) = %f\n", satans(FPI));
+ printf("satans(PI/2) = %f\n", satans(FPI/2));
+ printf("satans(PI/3) = %f\n", satans(FPI/3));
+ printf("satans(PI/4) = %f\n", satans(FPI/4));
+ printf("satans(PI/6) = %f\n", satans(FPI/6));
+ printf("satans(-PI) = %f\n", satans(-FPI));
+ printf("satans(-PI/2) = %f\n", satans(-FPI/2));
+ printf("satans(-PI/3) = %f\n", satans(-FPI/3));
+ printf("satans(-PI/4) = %f\n", satans(-FPI/4));
+ printf("satans(-PI/6) = %f\n", satans(-FPI/6));
+}
+
+int testAtan() {
+ printf("\n>>>> Float Arc tangeant Tests\n");
+ satansTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ catansTest();
+ satanaTest();
+ catanaTest();
+ */
+ return 0;
+}
+
+int main() {
+ assert(testAtan() == 0);
+ return 0;
+}
diff --git a/src/elementaryFunctions/atan/zatans.c b/src/elementaryFunctions/atan/zatans.c
index 03d4fff8..5dc471da 100644
--- a/src/elementaryFunctions/atan/zatans.c
+++ b/src/elementaryFunctions/atan/zatans.c
@@ -1,18 +1,18 @@
/*
-** -*- C -*-
-**
-** zatans.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Dec 7 12:05:48 2006 jofret
-** Last update Thu Sep 6 11:53:07 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 "atan.h"
doubleComplex zatans(doubleComplex z) {
/* FIXME: Dummy... */
- return (DoubleComplex(0,1));
+ return z;
}