[ntl] NTL RR class and long long integer
Victor Shoup
shoup at cs.nyu.edu
Thu Jul 9 16:48:15 CDT 2015
On all 64-bit machines that do not run windows, long=64bits.
See: LP64.
Windows is different. long=32bits, and to to get at 64-bits,
you have to use __int64 or long long.
I believe the latter was a part of C99, but was not officially
adopted in C++ until C++11.
On LP64 machines, long long = long = 64bits.
On Jul 9, 2015, at 5:42 PM, Friedrich Wiemer wrote:
> I can't believe there are no 64bit ints until c++11 on windows. Isn't long already 64bit on some x86 machines? ("some machines" still might not solve the issue)
>
> On July 9, 2015 11:38:32 PM CEST, Victor Shoup <shoup at cs.nyu.edu> wrote:
> A followup: "long long" is only a part of the language standard
> since C++11. So I guess before C++11, there was no standard
> way to get at 64-bit integers on Windoze. Anyway, now that it is
> a part of the standard, it would be reasonable to contemplate
> making such conversion operators. But they would only be useful
> for Windoze platforms, and that is a low priority.
> Plus, one would have to provide legacy switches so that
> one could get rid of these on platforms that have not yet
> implemented the C++11 standard.
>
>
> On Jul 9, 2015, at 5:32 PM, Friedrich Wiemer wrote:
>
> But you can convert to "standard" c++ types like int64_t or similar for sure! Maybe the are named similar on windows, but uint64_t, int64_t, etc. should be defined in stdint.h if I remember correctly.
> You can!
> than
> use normal c++ type conversions.
>
>
> On July 9, 2015 11:30:21 PM CEST, Luigi Candurro <luigicandurro at virgilio.it> wrote:
> Il 09/07/2015 23:14, Friedrich Wiemer ha scritto:
> Hi Luigi,
>
> did you try to convert RR to ZZ and then to int64?
> ZZ is NTLs multiprecision integer type, while RR is for multiprecision
> floats.
>
> Cheers, Friedrich
>
> Hi, Friedrich,
>
> unfortunately ZZ.h does not contain conversion definitions from ZZ to
> __int64 type.
>
> Thanks anyway
>
> Luigi
>
>
>
> ntl mailing list
> ntl at shoup.net
> http://shoup.net/mailman/listinfo/ntl_shoup.net
>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
>
> ntl mailing list
> ntl at shoup.net
> http://shoup.net/mailman/listinfo/ntl_shoup.net
>
>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
More information about the ntl
mailing list