why does matlab invent decimal numbers?
long = 2.305800000000000e+03;
short= 8.694000000000000e+02;
prof=3.175200000000000e+03
dail=long+short
dail-prof
%{
In my count: daily=2305.8+869.4=3175.2
dail-prof=0 but matlab write dail-prof=4.5475e-13
why does matlab add infinitesimals of decimals to me?
i see https://it.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html#f2-98690
but I didn’t find it useful
%}long = 2.305800000000000e+03;
short= 8.694000000000000e+02;
prof=3.175200000000000e+03
dail=long+short
dail-prof
%{
In my count: daily=2305.8+869.4=3175.2
dail-prof=0 but matlab write dail-prof=4.5475e-13
why does matlab add infinitesimals of decimals to me?
i see https://it.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html#f2-98690
but I didn’t find it useful
%} long = 2.305800000000000e+03;
short= 8.694000000000000e+02;
prof=3.175200000000000e+03
dail=long+short
dail-prof
%{
In my count: daily=2305.8+869.4=3175.2
dail-prof=0 but matlab write dail-prof=4.5475e-13
why does matlab add infinitesimals of decimals to me?
i see https://it.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html#f2-98690
but I didn’t find it useful
%} why does matlab invent decimal numbers? MATLAB Answers — New Questions