>> format long>> 4.1*808e6ans = 3.312800000000000e+09>> fix(4.1*808e6)ans = 3.312799999000000e+09>> fix(4*808e6 + .1*808e6)ans = 3.312800000000000e+09
MATLAB: Bug in rounding functions? Who can explain? :)
ceilfix?MATLABround
Related Question
- Improper negative number representation
- Fprintf(‘%3.1f’,round(-eps)) prints -0.0
- Isn’t 95.77-95.68 = exactly 0.09
- Numerical error in addition within precision limit
- Simple miscalculation: (1-0.95)*4000 = 2.000000000000002e+02
- Generate random matrix ‘r’ of size 3 by 4 with number varying between -4 and 6
Best Answer