When is flx y x y where x and y are floating point number

When is fl(x - y) = x - y where x and y are floating point numbers and fl rounds to the nearest floating point number?

Solution

x and y are floating point number

fl will round off the number so for fl(x-y) = x-y the decimal part of -y shuld be equals 0,

so when the x-y have same decimal part the above condition holds good

 When is fl(x - y) = x - y where x and y are floating point numbers and fl rounds to the nearest floating point number?Solutionx and y are floating point number

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site