Skip to content

Commit 93040a7

Browse files
authored
Suggestion for a better example program (#4641)
The format string in the printf_s explains what __umulh does better, visually speaking, by zero-padding all 64-bit values and separating the high and low parts of the product.
1 parent 0bd4489 commit 93040a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/intrinsics/umulh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ int main()
6262
unsigned __int64 result;
6363
result = __umulh(i, j); // result has the high 64 bits
6464
// of the product.
65-
printf_s("0x%I64x * 0x%I64x = 0x%I64x%I64x \n", i, j, result, k);
65+
printf_s("0x%016I64x * 0x%016I64x = 0x%016I64x_%016I64x \n", i, j, result, k);
6666
return 0;
6767
}
6868
```
6969

7070
```Output
71-
0x10 * 0xfedcba9876543210 = 0xfedcba98765432100
71+
0x0000000000000010 * 0xfedcba9876543210 = 0x000000000000000f_edcba98765432100
7272
```
7373

7474
**END Microsoft Specific**

0 commit comments

Comments
 (0)