Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MulDiv 

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.


int MulDiv(
  int nNumber,
  int nNumerator,
  int nDenominator
);

Parameters

nNumber

[in] Multiplicand.
nNumerator

[in] Multiplier.
nDenominator

[in] Number by which the result of the multiplication (nNumber * nNumerator) is to be divided.

If the function succeeds, the return value is the result of the multiplication and division. If either an overflow occurred or nDenominator was 0, the return value is –1.

Routine Required header Architecture

MulDiv

<cmnintrin.h>

x86, ARM, SH-4, MIPS

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.