|
5#

楼主 |
发表于 2011-11-15 21:34:07
|
只看该作者
Re: 四舍五入问题
[quote="sun59338":m54jtm3o]你要求的结果好像不是“根据每一个观测值的第一个非零数字进行四舍五入”;
另外有意思的是:0.1 will be converted to 0.01, but 0.05 be converted to 0.1.
anyway, code is funny - want=ifn(var>=5*10**floor(log10(var)),10**ceil(log10(var)),0.1*10**floor(log10(var)));[/quote:m54jtm3o]
是[quote:m54jtm3o]根据每一个观测值的第一个非零数字进行四舍五入[/quote:m54jtm3o],但的确也没注意0.1这种问题...多谢sun59338的提醒!! |
|