summaryrefslogtreecommitdiff
path: root/tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci
diff options
context:
space:
mode:
authorSiddhesh Wani2015-05-25 14:46:31 +0530
committerSiddhesh Wani2015-05-25 14:46:31 +0530
commitdb464f35f5a10b58d9ed1085e0b462689adee583 (patch)
treede5cdbc71a54765d9fec33414630ae2c8904c9b8 /tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci
downloadScilab2C_fossee_old-db464f35f5a10b58d9ed1085e0b462689adee583.tar.gz
Scilab2C_fossee_old-db464f35f5a10b58d9ed1085e0b462689adee583.tar.bz2
Scilab2C_fossee_old-db464f35f5a10b58d9ed1085e0b462689adee583.zip
Original Version
Diffstat (limited to 'tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci')
-rw-r--r--tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci b/tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci
new file mode 100644
index 0000000..a1e0d8c
--- /dev/null
+++ b/tests/unit_tests/test064_OpMinusFloatComplex/scilabcode/mainfunction.sci
@@ -0,0 +1,43 @@
+//SCI2C: DEFAULT_PRECISION= FLOAT
+
+function mainfunction()
+
+s1 = -5.4;
+disp('s1');
+disp(s1);
+
+s2 = -2.2-4*%i;
+disp('s2');
+disp(s2);
+
+A = ((1.2:0.99:4.9)')*(-2.3:1.1:3.9)
+disp('A = ((1.2:0.99:4.9)'')*(-2.3:1.1:3.9)');
+disp(A);
+
+B = -2.11*A-%i*A;
+disp('B');
+
+disp('o1 = -s1 - s2;');
+o1 = -s1 - s2;
+disp(o1);
+
+disp('o1 = -3.4 - 4.5;');
+o1 = (-3.4-%i) - (4.5-%i);
+disp(o1);
+
+disp('o2 = -3.4 - B - A;');
+o2 = -3.4 - B - A;
+disp(o2);
+
+disp('o3 = A - (-3.4);');
+o3 = A - (-3.4);
+disp(o3);
+
+disp('o4 = A - A;');
+o4 = A - B;
+disp(o4);
+
+disp('o5 = -A;');
+o5 = -B;
+disp(o5);
+endfunction