Matlab/Octave addition, losing digits of precision

南笙酒味 提交于 2019-12-06 01:25:37

The number is being rounded only for display purposes. Take a look at the format command if you wish to change it.

octave> 23 + 0.65850
ans =  23.659
octave> format free
octave> 23 + 0.65850
ans = 23.7
octave> format long g
octave> 23 + 0.65850
ans =              23.6585

Take a look at help format for the other options but remember, that this only affects the display. You are not losing any precision.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!