blob: 3641ab3b7b132ec37d5219df3194b2f70e96987c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
|