_MulHigh, _MulUnsignedHigh
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

_MulHigh, _MulUnsignedHigh 

Visual Studio 2005

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


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.

The long integer result of multiplying arg1 and arg2.

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).

Routine Required header Architecture

_MulHigh

<cmnintrin.h>

x86, ARM, SH-4, MIPS

_MulUnsignedHigh

<cmnintrin.h>

x86, ARM, SH-4, MIPS

Show:
© 2016 Microsoft