有人可以给我一些关于如何在浮点数(MASM)中将浮点舍入到最接近的.001的提示吗?我有2个整数。我需要显示商作为浮点数(num_1/num_2)。我得到了浮点运算部分的工作,但我无法弄清楚如何四舍五入的结果。任何建议,非常感谢!如何将浮点四舍五入到最接近的.001
;calculate the quotient as a floating-point number
fild num_1
fidiv num_2
roundps
;display the quotient as a floating-point number
call WriteFloat
call CrLf
为了说明问题,您正在谈论以10为底的数字,0.001,基数为2的浮点数,是的? – 2013-04-10 21:04:33