_MulHigh, _MulUnsignedHigh

9/7/2007

This function returns the high-order 32-bit result of multiplying two arguments.

Syntax

long __cdecl _MulHigh(
  long arg1,
  long arg2
);

unsigned long __cdecl _MulUnsignedHigh(
  unsigned long arg1,
  unsigned long arg2
);

Parameters

  • arg1
    [in] The first argument in the product.
  • arg2
    [in] The second argument in the product.

Return Values

The long integer result of multiplying arg1 and arg2.

Remarks

This function can be useful for detecting overflow. _MulHigh is useful for multiplying integers scaled to represent [-0.5..0.5), and _MulUnsignedHigh is useful for multiplying integers scaled to represent 0..1).

Requirements

Routine Required header Architecture

_MulHigh

<cmnintrin.h>

x86, ARM, SH-4, MIPS

_MulUnsignedHigh

<cmnintrin.h>

x86, ARM, SH-4, MIPS

See Also

Other Resources

Intrinsic Functions for Device Compilers