summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/float
diff options
context:
space:
mode:
authorsiddhu89902017-04-19 14:57:49 +0530
committersiddhu89902017-04-19 14:57:49 +0530
commit1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f (patch)
tree34e52b33707a829c1d8484428c96d3f1f6ce2b3a /src/c/elementaryFunctions/float
parent9e506f48291533cba7b4c555b0d2e98f234bfbe3 (diff)
downloadScilab2C_fossee_old-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.tar.gz
Scilab2C_fossee_old-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.tar.bz2
Scilab2C_fossee_old-1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f.zip
Merged Shamik's work
Diffstat (limited to 'src/c/elementaryFunctions/float')
-rw-r--r--src/c/elementaryFunctions/float/dfloata.c7
-rw-r--r--src/c/elementaryFunctions/float/dfloats.c5
-rw-r--r--src/c/elementaryFunctions/float/i16floata.c6
-rw-r--r--src/c/elementaryFunctions/float/i16floats.c5
-rw-r--r--src/c/elementaryFunctions/float/i8floata.c6
-rw-r--r--src/c/elementaryFunctions/float/i8floats.c5
-rw-r--r--src/c/elementaryFunctions/float/sfloata.c7
-rw-r--r--src/c/elementaryFunctions/float/sfloats.c5
-rw-r--r--src/c/elementaryFunctions/float/u16floata.c6
-rw-r--r--src/c/elementaryFunctions/float/u16floats.c5
-rw-r--r--src/c/elementaryFunctions/float/u8floata.c6
-rw-r--r--src/c/elementaryFunctions/float/u8floats.c5
12 files changed, 68 insertions, 0 deletions
diff --git a/src/c/elementaryFunctions/float/dfloata.c b/src/c/elementaryFunctions/float/dfloata.c
new file mode 100644
index 0000000..e27b0a1
--- /dev/null
+++ b/src/c/elementaryFunctions/float/dfloata.c
@@ -0,0 +1,7 @@
+#include "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 0000000..a56c24c
--- /dev/null
+++ b/src/c/elementaryFunctions/float/dfloats.c
@@ -0,0 +1,5 @@
+#include "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 0000000..e2366b7
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i16floata.c
@@ -0,0 +1,6 @@
+#include "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 0000000..c0c073c
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i16floats.c
@@ -0,0 +1,5 @@
+#include "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 0000000..b578fe5
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i8floata.c
@@ -0,0 +1,6 @@
+#include "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 0000000..15e4fc7
--- /dev/null
+++ b/src/c/elementaryFunctions/float/i8floats.c
@@ -0,0 +1,5 @@
+#include "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 0000000..c7583ba
--- /dev/null
+++ b/src/c/elementaryFunctions/float/sfloata.c
@@ -0,0 +1,7 @@
+#include "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 0000000..e579186
--- /dev/null
+++ b/src/c/elementaryFunctions/float/sfloats.c
@@ -0,0 +1,5 @@
+#include "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 0000000..28867cb
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u16floata.c
@@ -0,0 +1,6 @@
+#include "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 0000000..f46275d
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u16floats.c
@@ -0,0 +1,5 @@
+#include "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 0000000..8455420
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u8floata.c
@@ -0,0 +1,6 @@
+#include "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 0000000..f2b4c26
--- /dev/null
+++ b/src/c/elementaryFunctions/float/u8floats.c
@@ -0,0 +1,5 @@
+#include "float.h"
+
+float u8floats(uint8 x) {
+ return (float) x;
+}