summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/elementaryFunctions')
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/pow.h16
-rw-r--r--2.3-1/src/c/elementaryFunctions/includes/sqrt.h8
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h65
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_OpHat.h43
-rw-r--r--2.3-1/src/c/elementaryFunctions/interfaces/int_sqrt.h19
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/dpows.c3
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/dpows.c~19
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i16powa.c25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i16powa.c~25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i16pows.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i16pows.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i8powa.c25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i8powa.c~25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i8pows.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/i8pows.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u16powa.c25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u16powa.c~25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u16pows.c18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u16pows.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u8powa.c25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u8powa.c~25
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u8pows.c19
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/u8pows.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/zpows.c2
-rw-r--r--2.3-1/src/c/elementaryFunctions/pow/zpows.c~28
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c2
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c~20
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c2
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/i16sqrta.c~20
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/i16sqrts.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/i8sqrta.c~20
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/i8sqrts.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/u16sqrta.c~20
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/u16sqrts.c~18
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/u8sqrta.c~20
-rw-r--r--2.3-1/src/c/elementaryFunctions/sqrt/u8sqrts.c~18
37 files changed, 730 insertions, 12 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/includes/pow.h b/2.3-1/src/c/elementaryFunctions/includes/pow.h
index ec8216d8..de1eb409 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/pow.h
+++ b/2.3-1/src/c/elementaryFunctions/includes/pow.h
@@ -27,6 +27,14 @@ EXTERN_ELEMFUNCT floatComplex cpows(floatComplex value, floatComplex expand);
EXTERN_ELEMFUNCT doubleComplex zpows(doubleComplex value, doubleComplex expand);
+EXTERN_ELEMFUNCT uint8 u8pows(uint8 value, uint8 expand);
+
+EXTERN_ELEMFUNCT uint16 u16pows(uint16 value, uint16 expand);
+
+EXTERN_ELEMFUNCT int8 i8pows(int8 value, int8 expand);
+
+EXTERN_ELEMFUNCT int16 i16pows(int16 value, int16 expand);
+
EXTERN_ELEMFUNCT void spowa(float *value, int size, float* expand, float *out);
EXTERN_ELEMFUNCT void dpowa(double *value, int size, double* expand, double *out);
@@ -35,6 +43,14 @@ EXTERN_ELEMFUNCT void cpowa(floatComplex *value, int size, floatComplex* expand
EXTERN_ELEMFUNCT void zpowa(doubleComplex *value, int size, doubleComplex* expand, doubleComplex *out);
+EXTERN_ELEMFUNCT void u8powa(uint8 *value, int size, uint8* expand, uint8 *out);
+
+EXTERN_ELEMFUNCT void u16powa(uint16 *value, int size, uint16* expand, uint16 *out);
+
+EXTERN_ELEMFUNCT void i8powa(int8 *value, int size, int8* expand, int8 *out);
+
+EXTERN_ELEMFUNCT void i16powa(int16 *value, int size, int16* expand, int16 *out);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/2.3-1/src/c/elementaryFunctions/includes/sqrt.h b/2.3-1/src/c/elementaryFunctions/includes/sqrt.h
index 7885c9c2..df11b20e 100644
--- a/2.3-1/src/c/elementaryFunctions/includes/sqrt.h
+++ b/2.3-1/src/c/elementaryFunctions/includes/sqrt.h
@@ -16,6 +16,7 @@
#include "dynlib_elementaryfunctions.h"
#include "floatComplex.h"
#include "doubleComplex.h"
+#include "types.h"
#ifdef __cplusplus
extern "C" {
@@ -48,13 +49,14 @@ EXTERN_ELEMFUNCT floatComplex csqrts(floatComplex in);
*/
EXTERN_ELEMFUNCT doubleComplex zsqrts(doubleComplex in);
+
/*
** \brief Float Matrix Square Root function
** \param in : input array value.
** \param out : output array value.
** \param size : the size of in and out arrays.
*/
-EXTERN_ELEMFUNCT void ssqrta(float* in, int size, float* out);
+EXTERN_ELEMFUNCT void ssqrta(float* in, int size, float* out);
/*
** \brief Double Matrix Square Root function
@@ -80,6 +82,10 @@ EXTERN_ELEMFUNCT void csqrta(floatComplex* in, int size, floatComplex* out);
*/
EXTERN_ELEMFUNCT void zsqrta(doubleComplex* in, int size, doubleComplex* out);
+
+
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h
index 8e5c7042..2444f100 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h
@@ -25,6 +25,14 @@
#define z0z0OpDotHatz0(in1, in2) zpows(in1, in2)
+#define u80u80OpDotHatu80(in1, in2) u8pows(in1, in2)
+
+#define u160u160OpDotHatu160(in1, in2) u16pows(in1, in2)
+
+#define i80i80OpDotHati80(in1, in2) i8pows(in1, in2)
+
+#define i160i160OpDotHati60(in1, in2) i16pows(in1, in2)
+
#define s0c0OpDotHatc0(in1, in2) cpows(FloatComplex(in1,0), in2)
#define c0s0OpDotHatc0(in1, in2) cpows(in1, FloatComplex(in2,0))
@@ -53,6 +61,20 @@
for (i=0;i<size[0]*size[1];i++) out[i]=zpows(in1,in2[i]);\
}
+#define u80u82OpDotHatu82(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u8pows(in1,in2[i]);\
+ }
+
+#define u160u162OpDotHatu162(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u16pows(in1,in2[i]);\
+ }
+#define i80i82OpDotHati82(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i8pows(in1,in2[i]);\
+ }
+
+#define i160i162OpDotHati162(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i16pows(in1,in2[i]);\
+ }
#define s0c2OpDotHatc2(in1, in2, size, out) {int i=0;\
@@ -90,6 +112,23 @@
for (i=0;i<size[0]*size[1];i++) out[i]=zpows(in1[i],in2);\
}
+#define u82u80OpDotHatu82(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u8pows(in1[i],in2);\
+ }
+
+#define u162u160OpDotHatu162(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u16pows(in1[i],in2);\
+ }
+
+#define i82i80OpDotHati82(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i8pows(in1[i],in2);\
+ }
+
+#define i162i160OpDotHati162(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i16pows(in1[i],in2);\
+ }
+
+
#define s2c0OpDotHatc2(in1,size,in2,out) {int i=0;\
for (i=0;i<size[0]*size[1];i++) out[i]=cpows(FloatComplex(in1[i],0),in2);\
}
@@ -106,6 +145,24 @@
for (i=0;i<size[0]*size[1];i++) out[i]=zpows(in1[i],DoubleComplex(in2,0));\
}
+#define u82d0OpDotHatu82(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u8pows(in1[i],in2);\
+ }
+
+#define u162d0OpDotHatu162(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u16pows(in1[i],in2);\
+ }
+
+
+#define i82d0OpDotHati82(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i8pows(in1[i],in2);\
+ }
+
+#define i162d0OpDotHatui62(in1,size,in2,out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i16pows(in1[i],in2);\
+ }
+
+
/* Matrix - Matrix */
@@ -117,6 +174,14 @@
#define z2z2OpDotHatz2(in1, size1, in2, size2, out) zpowa(in1, size1[0]*size2[1], in2, out)
+#define u82u82OpDotHatu82(in1, size1, in2, size2, out) u8powa(in1, size1[0]*size2[1], in2, out)
+
+#define u162u162OpDotHatu162(in1, size1, in2, size2, out) u16powa(in1, size1[0]*size2[1], in2, out)
+
+#define i82i82OpDotHati82(in1, size1, in2, size2, out) i8powa(in1, size1[0]*size2[1], in2, out)
+
+#define i162i162OpDotHati162(in1, size1, in2, size2, out) i16powa(in1, size1[0]*size2[1], in2, out)
+
#define s2c2OpDotHatc2(in1, size1, in2, size2, out) {int i=0;\
for (i=0;i<size1[0]*size2[1];i++) out[i]=cpows(FloatComplex(in1[i],0),in2[i]);\
}
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_OpHat.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_OpHat.h
index 8cc8849c..f1bb8d51 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_OpHat.h
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_OpHat.h
@@ -23,6 +23,14 @@
#define c0c0OpHatc0(in1, in2) cpows(in1, in2)
+#define u80u80OpHatu80(in1,in2) u8pows(in1, in2)
+
+#define u160u160OpHatu160(in1,in2) u16pows(in1, in2)
+
+#define i80i80OpHati80(in1,in2) i8pows(in1, in2)
+
+#define i160i60OpHati60(in1,in2) i6pows(in1, in2)
+
#define s0c0OpHatc0(in1, in2) cpows(FloatComplex(in1,0), in2)
#define c0s0OpHatc0(in1, in2) cpows(in1, FloatComplex(in2,0))
@@ -54,6 +62,25 @@
for (i=0;i<size[0]*size[1];i++) out[i]=zpows(in1,in2[i]);\
}
+#define u80u82OpHatu82(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u8pows(in1,in2[i]);\
+ }
+
+
+#define u160u162OpHatu162(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=u16pows(in1,in2[i]);\
+ }
+
+#define i80i82OpHati82(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i8pows(in1,in2[i]);\
+ }
+
+
+#define i160i162OpHati162(in1, in2, size, out) {int i=0;\
+ for (i=0;i<size[0]*size[1];i++) out[i]=i16pows(in1,in2[i]);\
+ }
+
+
#define s0c2OpHatc2(in1, in2, size, out) {int i=0;\
@@ -84,6 +111,22 @@
#define z2z0OpHatz2(in1,size,in2,out) zpowma(in1,size[0],in2,out);
+#define u82u80OpHatu82(in1,size,in2,out) u8powa(in1,size[0],in2,out)
+
+#define u162u162OpHatu162(in1,size,in2,out) u16powa(in1,size[0],in2,out)
+
+#define i82i80OpHati82(in1,size,in2,out) i8powa(in1,size[0],in2,out)
+
+#define i162i160OpHati82(in1,size,in2,out) i16powa(in1,size[0],in2,out)
+
+#define u82d0OpHatu82(in1,size,in2,out) u8powa(in1,size[0],in2,out)
+
+#define u162d0OpHatu162(in1,size,in2,out) u16powa(in1,size[0],in2,out)
+
+#define i82d0OpHati82(in1,size,in2,out) i8powa(in1,size[0],in2,out)
+
+#define i162d0OpHati162(in1,sine,in2,out) i16powa(in1,size[0],in2,out)
+
/* FIXME : malloc here */
#define s2c0OpHatc2(in1,size,in2,out) {float* tmp;\
tmp = malloc((uint)(size[0]*size[1])*sizeof(float));\
diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_sqrt.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_sqrt.h
index 0efbca96..090d9825 100644
--- a/2.3-1/src/c/elementaryFunctions/interfaces/int_sqrt.h
+++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_sqrt.h
@@ -33,27 +33,32 @@
#define __INT_SQRT_H__
#define s0sqrts0(in) ssqrts(in)
-
+
#define s0sqrtc0(in) csqrts(FloatComplex(in,0))
#define d0sqrtd0(in) dsqrts(in)
-
+
#define d0sqrtz0(in) zsqrts(DoubleComplex(in,0))
#define c0sqrtc0(in) csqrts(in)
-
+
#define z0sqrtz0(in) zsqrts(in)
-
+
+
+
#define s2sqrts2(in,size,out) ssqrta(in, size[0]*size[1], out)
#define s2sqrtc2(in,size,out) csqrta(FloatComplexMatrix(in,0), size[0]*size[1], out)
#define d2sqrtd2(in,size,out) dsqrta(in, size[0]*size[1], out)
-
+
#define d2sqrtz2(in,size,out) zsqrta(DoubleComplexMatrix(in,0), size[0]*size[1], out)
#define c2sqrtc2(in,size,out) csqrta(in, size[0]*size[1], out)
-
-#define z2sqrtz2(in,size,out) zsqrta(in, size[0]*size[1], out)
+
+#define z2sqrtz2(in,size,out) zsqrta(in, size[0]*size[1], out)
+
+
+
#endif /* !__INT_SQRT_H__ */
diff --git a/2.3-1/src/c/elementaryFunctions/pow/dpows.c b/2.3-1/src/c/elementaryFunctions/pow/dpows.c
index c291bf71..cce89196 100644
--- a/2.3-1/src/c/elementaryFunctions/pow/dpows.c
+++ b/2.3-1/src/c/elementaryFunctions/pow/dpows.c
@@ -13,6 +13,7 @@
#include <math.h>
#include "pow.h"
-double dpows(double x, double p) {
+double dpows(double x, double p)
+{
return pow(x, p);
}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/dpows.c~ b/2.3-1/src/c/elementaryFunctions/pow/dpows.c~
new file mode 100644
index 00000000..cce89196
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/dpows.c~
@@ -0,0 +1,19 @@
+/*
+ * 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 "pow.h"
+
+double dpows(double x, double p)
+{
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i16powa.c b/2.3-1/src/c/elementaryFunctions/pow/i16powa.c
new file mode 100644
index 00000000..e8e87fd3
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i16powa.c
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void i16powa(int16* x, int size, int16* power, int16 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = i16pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i16powa.c~ b/2.3-1/src/c/elementaryFunctions/pow/i16powa.c~
new file mode 100644
index 00000000..e8e87fd3
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i16powa.c~
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void i16powa(int16* x, int size, int16* power, int16 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = i16pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i16pows.c b/2.3-1/src/c/elementaryFunctions/pow/i16pows.c
new file mode 100644
index 00000000..c8068c75
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i16pows.c
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+int16 i16pows(int16 x, int16 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i16pows.c~ b/2.3-1/src/c/elementaryFunctions/pow/i16pows.c~
new file mode 100644
index 00000000..c8068c75
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i16pows.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+int16 i16pows(int16 x, int16 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i8powa.c b/2.3-1/src/c/elementaryFunctions/pow/i8powa.c
new file mode 100644
index 00000000..e17b666d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i8powa.c
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void i8powa(int8* x, int size, int8* power, int8 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = i8pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i8powa.c~ b/2.3-1/src/c/elementaryFunctions/pow/i8powa.c~
new file mode 100644
index 00000000..e17b666d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i8powa.c~
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void i8powa(int8* x, int size, int8* power, int8 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = i8pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i8pows.c b/2.3-1/src/c/elementaryFunctions/pow/i8pows.c
new file mode 100644
index 00000000..3566c417
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i8pows.c
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+int8 i8pows(int8 x, int8 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/i8pows.c~ b/2.3-1/src/c/elementaryFunctions/pow/i8pows.c~
new file mode 100644
index 00000000..3566c417
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/i8pows.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+int8 i8pows(int8 x, int8 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u16powa.c b/2.3-1/src/c/elementaryFunctions/pow/u16powa.c
new file mode 100644
index 00000000..65ba77e7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u16powa.c
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void u16powa(uint16* x, int size, uint16* power, uint16 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = u16pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u16powa.c~ b/2.3-1/src/c/elementaryFunctions/pow/u16powa.c~
new file mode 100644
index 00000000..65ba77e7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u16powa.c~
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void u16powa(uint16* x, int size, uint16* power, uint16 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = u16pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u16pows.c b/2.3-1/src/c/elementaryFunctions/pow/u16pows.c
new file mode 100644
index 00000000..34672b0f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u16pows.c
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+uint16 u16pows(uint16 x, uint16 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u16pows.c~ b/2.3-1/src/c/elementaryFunctions/pow/u16pows.c~
new file mode 100644
index 00000000..34672b0f
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u16pows.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+uint16 u16pows(uint16 x, uint16 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u8powa.c b/2.3-1/src/c/elementaryFunctions/pow/u8powa.c
new file mode 100644
index 00000000..b69431c7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u8powa.c
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void u8powa(uint8* x, int size, uint8* power, uint8 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = u8pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u8powa.c~ b/2.3-1/src/c/elementaryFunctions/pow/u8powa.c~
new file mode 100644
index 00000000..b69431c7
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u8powa.c~
@@ -0,0 +1,25 @@
+/*
+ * 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 "pow.h"
+
+void u8powa(uint8* x, int size, uint8* power, uint8 *out) {
+ /*
+ Computes Scilab x.^power
+ Computes power element by element
+ x and power must have same size
+ */
+ int i = 0;
+ for (i = 0; i < size; ++i) {
+ out[i] = u8pows(x[i], power[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u8pows.c b/2.3-1/src/c/elementaryFunctions/pow/u8pows.c
new file mode 100644
index 00000000..786b9194
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u8pows.c
@@ -0,0 +1,19 @@
+/*
+ * 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 "pow.h"
+
+uint8 u8pows(uint8 x, uint8 p)
+{
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/u8pows.c~ b/2.3-1/src/c/elementaryFunctions/pow/u8pows.c~
new file mode 100644
index 00000000..4b5042ff
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/u8pows.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "pow.h"
+
+uint8 u8pows(uint8 x, uint8 p) {
+ return pow(x, p);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/pow/zpows.c b/2.3-1/src/c/elementaryFunctions/pow/zpows.c
index 1a7059b2..4fe771ab 100644
--- a/2.3-1/src/c/elementaryFunctions/pow/zpows.c
+++ b/2.3-1/src/c/elementaryFunctions/pow/zpows.c
@@ -14,7 +14,7 @@
#include "log.h"
#include "exp.h"
-doubleComplex zpows(doubleComplex z, doubleComplex power) {
+doubleComplex zpows(doubleComplex z, doubleComplex power) {
/*Cas z=0 */
if ( (zreals(z)==0) && (zimags(z)==0) ){
/* Cas 0^0 */
diff --git a/2.3-1/src/c/elementaryFunctions/pow/zpows.c~ b/2.3-1/src/c/elementaryFunctions/pow/zpows.c~
new file mode 100644
index 00000000..1a7059b2
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/pow/zpows.c~
@@ -0,0 +1,28 @@
+/*
+ * 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 "pow.h"
+#include "log.h"
+#include "exp.h"
+
+doubleComplex zpows(doubleComplex z, doubleComplex power) {
+ /*Cas z=0 */
+ if ( (zreals(z)==0) && (zimags(z)==0) ){
+ /* Cas 0^0 */
+ if ( (zreals(power)==0) && (zimags(power)==0) ) return DoubleComplex(1,0);
+ /* Cas 0^x, x!=0 */
+ return DoubleComplex(0,0);
+ }
+
+ /* Cas z!=0 */
+ return zexps(zmuls(zlogs(z), power));
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c
index a948f35b..b87800f4 100644
--- a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c
@@ -12,7 +12,7 @@
#include "sqrt.h"
-void dsqrta(double* in, int size, double* out) {
+void dsqrta(double* in, int size, double* out) {
int i = 0;
for (i = 0 ; i < size ; ++i) {
out[i] = dsqrts(in[i]);
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c~
new file mode 100644
index 00000000..a948f35b
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c~
@@ -0,0 +1,20 @@
+/*
+ * 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 "sqrt.h"
+
+void dsqrta(double* in, int size, double* out) {
+ int i = 0;
+ for (i = 0 ; i < size ; ++i) {
+ out[i] = dsqrts(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c
index 350cbbd0..8e664495 100644
--- a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c
@@ -13,6 +13,6 @@
#include <math.h>
#include "sqrt.h"
-double dsqrts(double in){
+double dsqrts(double in){
return sqrt(in);
}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c~
new file mode 100644
index 00000000..350cbbd0
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "sqrt.h"
+
+double dsqrts(double in){
+ return sqrt(in);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/i16sqrta.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/i16sqrta.c~
new file mode 100644
index 00000000..95a67982
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/i16sqrta.c~
@@ -0,0 +1,20 @@
+/*
+ * 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 "sqrt.h"
+
+void i16sqrta(int16* in, int size, int16* out) {
+ int i = 0;
+ for (i = 0 ; i < size ; ++i) {
+ out[i] = i16sqrts(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/i16sqrts.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/i16sqrts.c~
new file mode 100644
index 00000000..2f286214
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/i16sqrts.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "sqrt.h"
+
+int16 i16sqrts(int16 in){
+ return sqrt(in);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/i8sqrta.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/i8sqrta.c~
new file mode 100644
index 00000000..b4b40c48
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/i8sqrta.c~
@@ -0,0 +1,20 @@
+/*
+ * 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 "sqrt.h"
+
+void i8sqrta(int8* in, int size, int8* out) {
+ int i = 0;
+ for (i = 0 ; i < size ; ++i) {
+ out[i] = i8sqrts(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/i8sqrts.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/i8sqrts.c~
new file mode 100644
index 00000000..bbd6997e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/i8sqrts.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "sqrt.h"
+
+int8 i8sqrts(int8 in){
+ return sqrt(in);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/u16sqrta.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/u16sqrta.c~
new file mode 100644
index 00000000..2589a67d
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/u16sqrta.c~
@@ -0,0 +1,20 @@
+/*
+ * 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 "sqrt.h"
+
+void u16sqrta(uint16* in, int size, float* out) {
+ int i = 0;
+ for (i = 0 ; i < size ; ++i) {
+ out[i] = u16sqrts(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/u16sqrts.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/u16sqrts.c~
new file mode 100644
index 00000000..1226025e
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/u16sqrts.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "sqrt.h"
+
+float u16sqrts(uint16 in){
+ return sqrt(in);
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/u8sqrta.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/u8sqrta.c~
new file mode 100644
index 00000000..03424b99
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/u8sqrta.c~
@@ -0,0 +1,20 @@
+/*
+ * 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 "sqrt.h"
+
+void u8sqrta(uint8* in, int size, float* out) {
+ int i = 0;
+ for (i = 0 ; i < size ; ++i) {
+ out[i] = u8sqrts(in[i]);
+ }
+}
diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/u8sqrts.c~ b/2.3-1/src/c/elementaryFunctions/sqrt/u8sqrts.c~
new file mode 100644
index 00000000..29ecc40c
--- /dev/null
+++ b/2.3-1/src/c/elementaryFunctions/sqrt/u8sqrts.c~
@@ -0,0 +1,18 @@
+/*
+ * 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 "sqrt.h"
+
+float u8sqrts(uint8 in){
+ return sqrt(in);
+}