#7539: primes.p0.spkg with "prime_sieve.c" functionality
-----------------------------+----------------------------------------------
   Reporter:  GeorgSWeber    |       Owner:  rohana             
       Type:  enhancement    |      Status:  new                
   Priority:  major          |   Milestone:  sage-4.3.1         
  Component:  number theory  |    Keywords:                     
Work_issues:                 |      Author:  rohana, GeorgSWeber
   Upstream:  N/A            |    Reviewer:                     
     Merged:                 |  
-----------------------------+----------------------------------------------

Comment(by leif):

 WARNING: Do not use the current version of "Silva.c" to count primes in
 intervals beyond approx. 18302910352e9 (assuming a sieve segment size of
 2MB, i.e. _sieve_bits_log2_=24; with lower segment sizes, overflows occur
 later).

 Unfortunately, these early overflows do not lead to run-time errors (e.g.
 segmentation faults) but unsuspiciously wrong results.
 ["Obvious" (run-time) errors do occur much later due to other overflow
 conditions.]

 Note also that you currently must not use 1 as the interval's upper bound
 or (little worse) 2 as its lower bound, because prime counts will be wrong
 by one (1 is treated as prime while 2 is not).

 Nevertheless, Happy New Decade...

 -Leif

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7539#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--

You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to