Freigeben über


__umulh

Microsoft-spezifisch

Gibt die oberen 64 Bits des Produkts von zwei 64-Bit-Ganzzahlen ohne Vorzeichen zurück.

unsigned __int64 __umulh(     unsigned __int64 a,     unsigned __int64 b  );

Parameter

  • [in] a
    Die erste zu multiplizierende Zahl.

  • [in] b
    Die zweite zu multiplizierende Zahl.

Rückgabewert

Die oberen 64 Bits de 128-Bit-Ergebnisses der Multiplikation.

Anforderungen

Systemintern

Architektur

__umulh

x64

Headerdatei <intrin.h>

Hinweise

Diese Routinen sind nur als systeminterne Funktionen verfügbar.

Beispiel

// umulh.cpp
// processor: X64
#include <cstdio>
#include <intrin.h>

int main()
{
    unsigned __int64 i = 0x10;
    unsigned __int64 j = 0xFEDCBA9876543210;
    unsigned __int64 k = i * j; // k has the low 64 bits
                                // of the product.
    unsigned __int64 result;
    result = __umulh(i, j); // result has the high 64 bits
                            // of the product.
    printf_s("0x%I64x * 0x%I64x = 0x%I64x%I64x \n", i, j, result, k);
    return 0;
}
  

Siehe auch

Referenz

Intrinsische Compilerfunktionen