MulDiv函数是什么意思?

来源:百度知道 编辑:UC知道 时间:2024/09/23 05:35:01
这个函数可以带三个参数,请问是什么意思?
比如MulDiv(10, 2, 5)的结果是什么?

The MulDiv function multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The return value is rounded up or down to the nearest integer.
就是10*2/5.但是支持两个32位的数相乘也有正确的结果.32位的计算机如果不做处理正常是会溢出的.而这个函数保证不会.
结果是最接近的整型值.