It might be worth us including a 64 bit C++ constructor for mpz's on
Windows 64. At the moment the constructor basically mimics mpz_set_ui,
which explains the limitation.
Brian may be able to let us know whether it is even possible to do
this (I don't know enough C++ to say for sure).
Bill.
> --
> You received this message because you are subscribed to the Google Groups "mpir-devel" group.
> To post to this group, send email to mpir-...@googlegroups.com.
> To unsubscribe from this group, send email to mpir-devel+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mpir-devel?hl=en.
>
>
To my knowledge there are not even mpz_add_ux, mpz_mul_ux functions,
etc. in the MPIR C library, let alone C++ analogues.
I think it is essentially assumed that a C/C++ program on Windows will
use unsigned longs and longs throughout, not 64 bit integers.
>
> From Brian's answer:
>
> On Oct 24, 7:14 pm, Cactus <rieman...@gmail.com> wrote:
>> The only functions that are capable of dealing with 64 bit integers are the
>> get_ux(), set_ux(), get_sx() and set_sx() functions that have been added to
>> handle 64-bit integers.
>
> I understand that only the constructor incompatibility can be solved
> easily, and that the other operations supplied by the C++ wrapper
> first need support in the C part of the library. Is that correct?
>
I think so.
Bill.
Well, is it worth adding such?
If you're using a platform which, despite its machine word width being
64 bits, doesn't support an LP64 programming environment, you have to
pay the price.
Obviously one can convert 64-bit long long ints to mpzs and compute with
these.
Adding more _ux and _sx functions would perhaps make more sense once we
get long longs that are, e.g., 128 bits on a variety of platforms.
Otherwise adding such functions would just break compatibility with GMP
[further], i.e., programs using these functions wouldn't work with GMP
on other platforms. Although it's "To maintain full interface support
with GMP - MPIR is a drop-in replacement for GMP", not the other way
around. ;-)
2ct,
-leif
--
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email
That will never happen. 64 bits is enough for anyone.
>
> Otherwise adding such functions would just break compatibility with GMP
> [further], i.e., programs using these functions wouldn't work with GMP
> on other platforms. Although it's "To maintain full interface support
> with GMP - MPIR is a drop-in replacement for GMP", not the other way
> around. ;-)
>
>
There are obviously competing project aims at work here.
Bill.
I bet the same had been said about 32-bit ints (and pointers, or an
address space of 4GB) when they were introduced.
64 bits are enough, just like 32 bits are enough for IP addresses.
--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+...@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.