summaryrefslogtreecommitdiff
path: root/260/CH2/EX2.3/2_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '260/CH2/EX2.3/2_3.sce')
-rw-r--r--260/CH2/EX2.3/2_3.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/260/CH2/EX2.3/2_3.sce b/260/CH2/EX2.3/2_3.sce
new file mode 100644
index 000000000..3641ab3b7
--- /dev/null
+++ b/260/CH2/EX2.3/2_3.sce
@@ -0,0 +1,15 @@
+//Eg-2.3
+//pg-53
+
+clear
+clc
+close()
+
+a=1.234;
+b=.0005678;
+x=nearfloat("succ",a+b);
+y=double(a+b);
+
+printf('The value of sum of two numbers using float data type is ')
+disp(x)
+printf('and the one using the double precision is \n%f\n',y)