Re: gcd: Allow customizing the parameter and result type

2025-06-22 Thread Bruno Haible via Gnulib discussion list
Hi Paul, > Why not default GCD_WORD_T to unsigned long long int? Existing usages > will work and this will be less hassle (and likely less error-prone) for > usages. Doing so would be overkill on 32-bit platforms. 64-bit arithmetic on i386, for example, uses many registers and thus becomes slow

Re: gcd: Allow customizing the parameter and result type

2025-06-22 Thread Paul Eggert
On 2025-06-22 13:16, Bruno Haible via Gnulib discussion list wrote: +#ifdef GCD_WORD_T +/* Make sure that GCD_WORD_T is defined as a type. */ +# include +# include +#else +# define GCD_WORD_T unsigned long +#endif A little bikeshedding (hope you don't mind) If the includer #defines GC