libntl / ntl

266 stars 53 forks source link

ZZ: need long long conv, maybe #28

Open Artoria2e5 opened 8 months ago

Artoria2e5 commented 8 months ago

On Apple's macOS, both long and long long are 64 bits. The system chooses to define uint64_t as unsigned long long, which isn't covered by NTL's conv routines, leading to some pretty unpleasant errors as I detailed in https://github.com/vigna/CPRNG/issues/1.

Because NTL covers unsigned long which is the same size on that particular system, I ended up getting away with supplying an explicit unsigned long type argument to the template. But that's hacky. Maybe something can be done to officially add long long to ZZ.h?

victorshoup commented 8 months ago

I agree, it is something that should be addressed. On Mar 2, 2024, at 3:30 AM, Mingye Wang @.***> wrote: On Apple's macOS, both long and long long are 64 bits. The system chooses to define uint64_t as unsigned long long, which isn't covered by NTL's conv routines, leading to some pretty unpleasant errors as I detailed in vigna/CPRNG#1. Because NTL covers unsigned long, on that particular system I ended up getting away with supplying an explicit unsigned long type argument to the template. But that's hacky. Maybe something can be done to officially add long long to ZZ.h?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>