From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 243/CH3/EX3.20/3_20.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 243/CH3/EX3.20/3_20.sce (limited to '243/CH3/EX3.20/3_20.sce') 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 -- cgit