.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH RtlExtendedMagicDivide 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBRtlExtendedMagicDivide\fR (NTDLL.@) .SH SYNOPSIS #define RtlExtendedMagicDivide ( A ) .SH DESCRIPTION .PP Allows replacing a division by a longlong constant with a multiplication by the inverse constant. .SH RETURNS .PP (dividend * inverse_divisor) >> (\fB64\fR + shift). .SH NOTES .PP If the divisor of a division is constant, the constants inverse_divisor and shift must be chosen such that inverse_divisor = 2^(\fB64\fR + shift) / divisor. Then we have RtlExtendedMagicDivide(dividend,inverse_divisor,shift) == dividend * inverse_divisor / 2^(\fB64\fR + shift) == dividend / divisor. .PP The Parameter inverse_divisor although defined as \fBLONGLONG\fR is used as \fBULONGLONG\fR. .SH IMPLEMENTATION .PP Declared in \fB"winternl.h"\fR. .PP Implemented in \fB"dlls/ntdll/large_int.c"\fR.