I added n_to_bit_start and after some misadventure with mistyping I got it
working.
One quick question: in this code block should the SWING_ON_PRIME be
indented?
LOOP_ON_SIEVE_BEGIN (prime, ...);
SH_SWING_A_PRIME (prime, ...);
LOOP_ON_SIEVE_END;
One thing I don't like about the patch is that mos
Ciao,
Il 2020-03-16 04:36 Seth Troisi ha scritto:
Per Marco's comments in my prev_prime/next_prime patch
I moved some of the primesieve macros and functions to gmp-impl.h
There are two reasons why I never moved those functions and macros to
gmp-impl.h, two aspects of one problem: the interfa
The code in mpz/primorial_ui.c and tests/devel/primes.c is fairly
self-documenting but I added this comment to gmp-impl.h
-/* primesieve macros and functions */
+/*
+ * primesieve macros and functions
+ *
+ * These macros are used to iterate over primes found by gmp_primesieve
+ * which are stored
Seth Troisi writes:
> It's not clear where this should be documented, if someone tells me I'm
> happy to add some documentation.
Since it's an internal interface, it doesn't need documentation in the
user manual. Documentation in comments in gmp-impl.h is fine, I think.
Regards,
/Niels
--
Nie
Per Marco's comments in my prev_prime/next_prime patch
I moved some of the primesieve macros and functions to gmp-impl.h
LOOP_ON_SIEVE_BEGIN
LOOP_ON_SIEVE_CONTINUE
LOOP_ON_SIEVE_STOP
LOOP_ON_SIEVE_END
bit_to_n (renamed sieve_bit_to_n)
id_to_n (renamedi sieve_id_to_n)
n_to_bit (renamed sieve_n_to_b