diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /243/CH3/EX3.20/3_20.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '243/CH3/EX3.20/3_20.sce')
-rwxr-xr-x | 243/CH3/EX3.20/3_20.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/243/CH3/EX3.20/3_20.sce b/243/CH3/EX3.20/3_20.sce new file mode 100755 index 000000000..6496ad36d --- /dev/null +++ b/243/CH3/EX3.20/3_20.sce @@ -0,0 +1,18 @@ +//Example No. 3_20
+//Floating Point Arithmetic
+//Pg No. 56
+clear ;close ;clc ;
+
+fx = 0.875000 ;
+Ex = -18 ;
+fy = 0.200000 ;
+Ey = 95 ;
+fz = fx/fy
+Ez = Ex - Ey
+mprintf('\n fz = %f \n Ez = %i \n z = %f E%i \n',fz,Ez,fz,Ez)
+
+if fz > 1 then
+ fz = fz/10
+ Ez = Ez + 1
+ mprintf('\n z = %f E%i (normalised) \n',fz,Ez)
+end
\ No newline at end of file |