How to subtract two close numbers?

2 visualizaciones (últimos 30 días)
kamiR fardi
kamiR fardi el 16 de Oct. de 2019
Comentada: kamiR fardi el 16 de Oct. de 2019
Hi!
I've compiled the code below and i don't know why it doesn't give exact zero.
I'll appreciate if someone helps me.
format long
x=5.4;
y=x-5;
z=y-0.4;
disp(z)

Respuesta aceptada

Stephen23
Stephen23 el 16 de Oct. de 2019
Editada: Stephen23 el 16 de Oct. de 2019

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by