Next: Function Classes, Previous: Nomenclature and Types, Up: MPIR Basics [Index]
Although Windows x64 is a 64-bit operating system, Microsoft has decided to make long integers 32-bits, which is inconsistent when compared with almost all other 64-bit operating systems. This has caused many subtle bugs when open source code is ported to Windows x64 because many developers reasonably expect to find that long integers on a 64-bit operating system will be 64 bits long.
MPIR contains functions with suffixes of _ui and _si that are
used to input unsigned and signed integers into and convert them for use
with MPIR’s multiple precision integers (mpz types). For example, the
following functions set an mpz_t integer from unsigned and
signed long integers respectively.
Also, the following functions obtain unsigned and
signed long int values from an MPIR multiple precision integer
(mpz_t).
To bring MPIR on Windows x64 into line with other 64-bit operating systems two new types have been introduced throughout MPIR:
mpir_ui defined as unsigned long int on all but Windows x64, defined as unsigned long long int on Windows x64
mpir_si defined as signed long int on all but Windows x64, defined as signed long long int on Windows x64
The above prototypes in MPIR 2.6.0 are changed to:
These changes are applied to all MPIR functions with _ui and
_si suffixes.
Next: Function Classes, Previous: Nomenclature and Types, Up: MPIR Basics [Index]