diff options
author | torset | 2009-01-26 12:47:37 +0000 |
---|---|---|
committer | torset | 2009-01-26 12:47:37 +0000 |
commit | 3b61bb79dae5c1663222f8d9da89ccad1330078b (patch) | |
tree | 050db4bced660cab221a798719b8f4c10da50a48 /src/Scilab2C | |
parent | 7d731910fc7d1cedb02bf342e435e6c36967b520 (diff) | |
download | scilab2c-3b61bb79dae5c1663222f8d9da89ccad1330078b.tar.gz scilab2c-3b61bb79dae5c1663222f8d9da89ccad1330078b.tar.bz2 scilab2c-3b61bb79dae5c1663222f8d9da89ccad1330078b.zip |
Remove Old
Diffstat (limited to 'src/Scilab2C')
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/cloga.c | 20 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/clogs.c | 64 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/dloga.c | 20 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/dlogs.c | 18 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/sloga.c | 20 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/slogs.c | 18 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/zloga.c | 20 | ||||
-rw-r--r-- | src/Scilab2C/Scilab2C/CFiles/sci2ccode/zlogs.c | 64 |
8 files changed, 0 insertions, 244 deletions
diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/cloga.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/cloga.c deleted file mode 100644 index 6edf1dd0..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/cloga.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 "log.h" - -void cloga(floatComplex* in, int size, floatComplex* out) { - int i = 0; - for (i = 0; i < size; ++i) { - out[i] = clogs(in[i]); - } -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/clogs.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/clogs.c deleted file mode 100644 index d402d1d1..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/clogs.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "log.h" -#include "lapack.h" -#include "log1p.h" -#include "pythag.h" - -floatComplex clogs(floatComplex in) { - static float sR2 = 1.41421356237309504f; - - float _RealIn = creals(in); - float _ImgIn = cimags(in); - - float _RealOut = 0; - float _ImgOut = 0; - - float RMax = (float) getOverflowThreshold(); - float LInf = sqrtf((float) getUnderflowThreshold()); - float LSup = sqrtf(0.5f * RMax); - - float AbsReal = fabsf(_RealIn); - float AbsImg = fabsf(_ImgIn); - - _ImgOut = atan2f(_ImgIn, _RealIn); - - if(_ImgIn > _RealIn) - {/* switch Real part and Imaginary part */ - float Temp = AbsReal; - AbsReal = AbsImg; - AbsImg = Temp; - } - - if((0.5 <= AbsReal) && (AbsReal <= sR2)) - _RealOut = 0.5f * slog1ps((AbsReal - 1.0f) * (AbsReal + 1.0f) + AbsImg * AbsImg); - else if(LInf < AbsImg && AbsReal < LSup) - _RealOut = 0.5f * slogs(AbsReal * AbsReal + AbsImg * AbsImg); - else if(AbsReal > RMax) - _RealOut = AbsReal; - else - { - float Temp = spythags(AbsReal, AbsImg); - if(Temp <= RMax) - { - _RealOut = slogs(Temp); - } - else /* handle rare spurious overflow with : */ - { - float Temp2 = AbsImg/AbsReal; - _RealOut = slogs(AbsReal) + 0.5f * slog1ps(Temp2 * Temp2); - } - } - return FloatComplex(_RealOut, _ImgOut); -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/dloga.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/dloga.c deleted file mode 100644 index e5f7490d..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/dloga.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 "log.h" - -void dloga(double* x, int size, double* y) { - int i = 0; - for (i = 0; i < size; ++i) { - y[i] = dlogs(x[i]); - } -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/dlogs.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/dlogs.c deleted file mode 100644 index c75bef21..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/dlogs.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 "log.h" - -double dlogs(double in) { - return (log(in)); -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/sloga.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/sloga.c deleted file mode 100644 index e6fab861..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/sloga.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 "log.h" - -void sloga(float* in, int size, float* out) { - int i = 0; - for (i = 0; i < size; ++i) { - out[i] = slogs(in[i]); - } -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/slogs.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/slogs.c deleted file mode 100644 index f8e7b61b..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/slogs.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 "log.h" - -float slogs(float in) { - return (logf(in)); -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/zloga.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/zloga.c deleted file mode 100644 index d4f083d7..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/zloga.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 "log.h" - -void zloga(doubleComplex* in, int size, doubleComplex* out) { - int i = 0; - for (i = 0; i < size; ++i) { - out[i] = zlogs(in[i]); - } -} diff --git a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/zlogs.c b/src/Scilab2C/Scilab2C/CFiles/sci2ccode/zlogs.c deleted file mode 100644 index dd0792a9..00000000 --- a/src/Scilab2C/Scilab2C/CFiles/sci2ccode/zlogs.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 "log.h" -#include "lapack.h" -#include "log1p.h" -#include "pythag.h" - -doubleComplex zlogs(doubleComplex in) { - static double sR2 = 1.41421356237309504; - - double _RealIn = zreals(in); - double _ImgIn = zimags(in); - - double _RealOut = 0; - double _ImgOut = 0; - - double RMax = getOverflowThreshold(); - double LInf = sqrt(getUnderflowThreshold()); - double LSup = sqrt(0.5 * RMax); - - double AbsReal = fabs(_RealIn); - double AbsImg = fabs(_ImgIn); - - _ImgOut = atan2(_ImgIn, _RealIn); - - if(_ImgIn > _RealIn) - {/* switch Real part and Imaginary part */ - double Temp = AbsReal; - AbsReal = AbsImg; - AbsImg = Temp; - } - - if((0.5 <= AbsReal) && (AbsReal <= sR2)) - _RealOut = 0.5 * dlog1ps((AbsReal - 1) * (AbsReal + 1) + AbsImg * AbsImg); - else if(LInf < AbsImg && AbsReal < LSup) - _RealOut = 0.5 * dlogs(AbsReal * AbsReal + AbsImg * AbsImg); - else if(AbsReal > RMax) - _RealOut = AbsReal; - else - { - double Temp = dpythags(AbsReal, AbsImg); - if(Temp <= RMax) - { - _RealOut = dlogs(Temp); - } - else /* handle rare spurious overflow with : */ - { - double Temp2 = AbsImg/AbsReal; - _RealOut = dlogs(AbsReal) + 0.5 * dlog1ps(Temp2 * Temp2); - } - } - return DoubleComplex(_RealOut, _ImgOut); -} |