summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/float
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-09-29 22:00:40 +0530
committerAbhinav Dronamraju2017-09-29 22:00:40 +0530
commit9bc7ad78e8d7d7acc4b9387aa592542832e80b31 (patch)
tree7fce060665a91de5e5adb12d02003351c3d1fdfc /src/c/elementaryFunctions/float
parent33755eb085a3ca8154cf83773b23fbb8aac4ba3e (diff)
parentac0045f12ad3d0938758e9742f4107a334e1afaa (diff)
downloadscilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.gz
scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.bz2
scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.zip
NEW FEATURES AND NEW FUNCTIONS
Diffstat (limited to 'src/c/elementaryFunctions/float')
-rw-r--r--src/c/elementaryFunctions/float/dfloata.c18
-rw-r--r--src/c/elementaryFunctions/float/dfloats.c16
-rw-r--r--src/c/elementaryFunctions/float/i16floata.c17
-rw-r--r--src/c/elementaryFunctions/float/i16floats.c16
-rw-r--r--src/c/elementaryFunctions/float/i8floata.c17
-rw-r--r--src/c/elementaryFunctions/float/i8floats.c16
-rw-r--r--src/c/elementaryFunctions/float/sfloata.c18
-rw-r--r--src/c/elementaryFunctions/float/sfloats.c16
-rw-r--r--src/c/elementaryFunctions/float/u16floata.c17
-rw-r--r--src/c/elementaryFunctions/float/u16floats.c16
-rw-r--r--src/c/elementaryFunctions/float/u8floata.c17
-rw-r--r--src/c/elementaryFunctions/float/u8floats.c16
12 files changed, 200 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/float/dfloata.c b/src/c/elementaryFunctions/float/dfloata.c
new file mode 100644
index 00000000..9705bd1a
--- /dev/null
+++ b/src/c/elementaryFunctions/float/dfloata.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void dfloata(double* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++)
+ out[i] = dfloats(x[i]);
+}
diff --git a/src/c/elementaryFunctions/float/dfloats.c b/src/c/elementaryFunctions/float/dfloats.c
new file mode 100644
index 00000000..ece554a8
--- /dev/null
+++ b/src/c/elementaryFunctions/float/dfloats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float dfloats(double x) {
+ return (float) x;
+}
diff --git a/src/c/elementaryFunctions/float/i16floata.c b/src/c/elementaryFunctions/float/i16floata.c
new file mode 100644
index 00000000..c8113af9
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i16floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void i16floata(int16* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i16floats(x[i]);
+}
diff --git a/src/c/elementaryFunctions/float/i16floats.c b/src/c/elementaryFunctions/float/i16floats.c
new file mode 100644
index 00000000..9f3ee063
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i16floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float i16floats(int16 x) {
+ return (float) x;
+}
diff --git a/src/c/elementaryFunctions/float/i8floata.c b/src/c/elementaryFunctions/float/i8floata.c
new file mode 100644
index 00000000..52f9a6a6
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i8floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void i8floata(int8* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = i8floats(x[i]);
+}
diff --git a/src/c/elementaryFunctions/float/i8floats.c b/src/c/elementaryFunctions/float/i8floats.c
new file mode 100644
index 00000000..88127b3f
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i8floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float i8floats(int8 x) {
+ return (float) x;
+}
diff --git a/src/c/elementaryFunctions/float/sfloata.c b/src/c/elementaryFunctions/float/sfloata.c
new file mode 100644
index 00000000..34337068
--- /dev/null
+++ b/src/c/elementaryFunctions/float/sfloata.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void sfloata(float* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++)
+ out[i] = sfloats(x[i]);
+}
diff --git a/src/c/elementaryFunctions/float/sfloats.c b/src/c/elementaryFunctions/float/sfloats.c
new file mode 100644
index 00000000..3351fb03
--- /dev/null
+++ b/src/c/elementaryFunctions/float/sfloats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float sfloats(float x) {
+ return (float) x;
+}
diff --git a/src/c/elementaryFunctions/float/u16floata.c b/src/c/elementaryFunctions/float/u16floata.c
new file mode 100644
index 00000000..febe5e08
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u16floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void u16floata(uint16* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u16floats(x[i]);
+}
diff --git a/src/c/elementaryFunctions/float/u16floats.c b/src/c/elementaryFunctions/float/u16floats.c
new file mode 100644
index 00000000..47e19aed
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u16floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float u16floats(uint16 x) {
+ return (float) x;
+}
diff --git a/src/c/elementaryFunctions/float/u8floata.c b/src/c/elementaryFunctions/float/u8floata.c
new file mode 100644
index 00000000..a4a1fec3
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u8floata.c
@@ -0,0 +1,17 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+void u8floata(uint8* x, int size, float* out) {
+ int i = 0;
+ for (i=0;i<size;i++) out[i] = u8floats(x[i]);
+}
diff --git a/src/c/elementaryFunctions/float/u8floats.c b/src/c/elementaryFunctions/float/u8floats.c
new file mode 100644
index 00000000..8b7dd8df
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u8floats.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2017 - IIT Bombay - FOSSEE
+
+ 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
+ Organization: FOSSEE, IIT Bombay
+ Author: Shamik Guha
+ Email: toolbox@scilab.in
+*/
+#include "get_float.h"
+
+float u8floats(uint8 x) {
+ return (float) x;
+}