diff options
author | jofret | 2008-05-22 09:40:40 +0000 |
---|---|---|
committer | jofret | 2008-05-22 09:40:40 +0000 |
commit | 883693213d04ea4b95c618ae6a258c1566c3ffc6 (patch) | |
tree | ae2015d5109b801f73ca687b1ae01804fc31f304 /src/elementaryFunctions/log10 | |
parent | 6d2a9845241e1c1b9774165847f2836b9bc81aee (diff) | |
download | scilab2c-883693213d04ea4b95c618ae6a258c1566c3ffc6.tar.gz scilab2c-883693213d04ea4b95c618ae6a258c1566c3ffc6.tar.bz2 scilab2c-883693213d04ea4b95c618ae6a258c1566c3ffc6.zip |
* Update to Scilab Algorithm
* License update
* Need some tests
Diffstat (limited to 'src/elementaryFunctions/log10')
-rw-r--r-- | src/elementaryFunctions/log10/Makefile.am | 5 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/Makefile.in | 12 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/clog10a.c | 20 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/clog10s.c | 5 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/dlog10a.c | 20 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/dlog10s.c | 20 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/slog10a.c | 20 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/zlog10a.c | 20 | ||||
-rw-r--r-- | src/elementaryFunctions/log10/zlog10s.c | 5 |
9 files changed, 72 insertions, 55 deletions
diff --git a/src/elementaryFunctions/log10/Makefile.am b/src/elementaryFunctions/log10/Makefile.am index 3934a102..c4899cdd 100644 --- a/src/elementaryFunctions/log10/Makefile.am +++ b/src/elementaryFunctions/log10/Makefile.am @@ -39,7 +39,12 @@ check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \ $(top_builddir)/type/libFloatComplex.la \ + $(top_builddir)/lib/lapack/libscilapack.la \ + $(top_builddir)/elementaryFunctions/log/libLog.la \ $(top_builddir)/elementaryFunctions/log10/libLog10.la \ + $(top_builddir)/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/auxiliaryFunctions/pythag/libPythag.la \ @LIBMATH@ check_PROGRAMS = testFloatLog10 testDoubleLog10 diff --git a/src/elementaryFunctions/log10/Makefile.in b/src/elementaryFunctions/log10/Makefile.in index 0cb3b8ff..19a3e04d 100644 --- a/src/elementaryFunctions/log10/Makefile.in +++ b/src/elementaryFunctions/log10/Makefile.in @@ -68,7 +68,12 @@ am_testDoubleLog10_OBJECTS = \ testDoubleLog10_OBJECTS = $(am_testDoubleLog10_OBJECTS) am__DEPENDENCIES_1 = $(top_builddir)/type/libDoubleComplex.la \ $(top_builddir)/type/libFloatComplex.la \ - $(top_builddir)/elementaryFunctions/log10/libLog10.la + $(top_builddir)/lib/lapack/libscilapack.la \ + $(top_builddir)/elementaryFunctions/log/libLog.la \ + $(top_builddir)/elementaryFunctions/log10/libLog10.la \ + $(top_builddir)/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/auxiliaryFunctions/pythag/libPythag.la testDoubleLog10_DEPENDENCIES = $(am__DEPENDENCIES_1) testDoubleLog10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLog10_CFLAGS) \ @@ -233,7 +238,12 @@ check_INCLUDES = -I $(top_builddir)/elementaryFunctions/includes \ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \ $(top_builddir)/type/libFloatComplex.la \ + $(top_builddir)/lib/lapack/libscilapack.la \ + $(top_builddir)/elementaryFunctions/log/libLog.la \ $(top_builddir)/elementaryFunctions/log10/libLog10.la \ + $(top_builddir)/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/auxiliaryFunctions/pythag/libPythag.la \ @LIBMATH@ diff --git a/src/elementaryFunctions/log10/clog10a.c b/src/elementaryFunctions/log10/clog10a.c index 2228c869..6f8d1905 100644 --- a/src/elementaryFunctions/log10/clog10a.c +++ b/src/elementaryFunctions/log10/clog10a.c @@ -1,14 +1,14 @@ /* -** -*- C -*- -** -** clog10a.c -** Made by Bruno JOFRET <bruno.jofret@inria.fr> -** -** Started on Thu Sep 6 16:23:40 2007 bruno -** Last update Mon Oct 22 09:52:46 2007 bruno -** -** Copyright INRIA 2007 -*/ + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-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 "log10.h" diff --git a/src/elementaryFunctions/log10/clog10s.c b/src/elementaryFunctions/log10/clog10s.c index 31e0ec85..7d35ab1b 100644 --- a/src/elementaryFunctions/log10/clog10s.c +++ b/src/elementaryFunctions/log10/clog10s.c @@ -11,8 +11,9 @@ */ #include "log10.h" +#include "log.h" floatComplex clog10s(floatComplex in) { - /* FIXME : Implementation */ - return in; + floatComplex log_z = clogs(in); + return FloatComplex(creals(log_z) / slogs(10.0f), cimags(log_z) / slogs(10.0f)); } diff --git a/src/elementaryFunctions/log10/dlog10a.c b/src/elementaryFunctions/log10/dlog10a.c index 0eadbc52..fcfeb486 100644 --- a/src/elementaryFunctions/log10/dlog10a.c +++ b/src/elementaryFunctions/log10/dlog10a.c @@ -1,14 +1,14 @@ /* -** -*- C -*- -** -** dlog10a.c -** Made by Bruno JOFRET <bruno.jofret@inria.fr> -** -** Started on Thu Sep 6 16:23:09 2007 bruno -** Last update Mon Oct 22 09:52:35 2007 bruno -** -** Copyright INRIA 2007 -*/ + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-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 "log10.h" diff --git a/src/elementaryFunctions/log10/dlog10s.c b/src/elementaryFunctions/log10/dlog10s.c index 2b9750dc..14bc739b 100644 --- a/src/elementaryFunctions/log10/dlog10s.c +++ b/src/elementaryFunctions/log10/dlog10s.c @@ -1,14 +1,14 @@ /* -** -*- C -*- -** -** dlog10s.c -** Made by Bruno JOFRET <bruno.jofret@inria.fr> -** -** Started on Fri Apr 20 14:26:10 2007 jofret -** Last update Thu Sep 6 16:23:04 2007 bruno -** -** Copyright INRIA 2007 -*/ + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-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 "log10.h" diff --git a/src/elementaryFunctions/log10/slog10a.c b/src/elementaryFunctions/log10/slog10a.c index 7eac52e7..b5f65405 100644 --- a/src/elementaryFunctions/log10/slog10a.c +++ b/src/elementaryFunctions/log10/slog10a.c @@ -1,14 +1,14 @@ /* -** -*- C -*- -** -** slog10a.c -** Made by Bruno JOFRET <bruno.jofret@inria.fr> -** -** Started on Thu Sep 6 16:22:18 2007 bruno -** Last update Mon Oct 22 09:52:23 2007 bruno -** -** Copyright INRIA 2007 -*/ + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-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 "log10.h" diff --git a/src/elementaryFunctions/log10/zlog10a.c b/src/elementaryFunctions/log10/zlog10a.c index 789f8f98..dd25f7a5 100644 --- a/src/elementaryFunctions/log10/zlog10a.c +++ b/src/elementaryFunctions/log10/zlog10a.c @@ -1,14 +1,14 @@ /* -** -*- C -*- -** -** zlog10a.c -** Made by Bruno JOFRET <bruno.jofret@inria.fr> -** -** Started on Thu Sep 6 16:21:57 2007 bruno -** Last update Mon Oct 22 09:52:13 2007 bruno -** -** Copyright INRIA 2007 -*/ + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-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 "log10.h" diff --git a/src/elementaryFunctions/log10/zlog10s.c b/src/elementaryFunctions/log10/zlog10s.c index 7988b00d..5403162f 100644 --- a/src/elementaryFunctions/log10/zlog10s.c +++ b/src/elementaryFunctions/log10/zlog10s.c @@ -11,8 +11,9 @@ */ #include "log10.h" +#include "log.h" doubleComplex zlog10s(doubleComplex in) { - /* FIXME : Implementation */ - return in; + doubleComplex log_z = zlogs(in); + return DoubleComplex(zreals(log_z) / dlogs(10.0), zimags(log_z) / dlogs(10.0)); } |