On May 3, 5:54 am, "Dr. David Kirkby" <david.kir...@onetel.net> wrote:
> mabshoff wrote:
> > Ok, I would suggest we do the following:
>
> >  * In 3.4.2 cap prime_pi at 2^40 since that is what Andrew suggests as
> > correct range for his algorithm
> >  * add the following #long doctest (it takes about 25 seconds total in
> > sage.math):
>
> > sage: for n in (30..40):
> > ....:     time prime_pi(2^n)
> > <SNIP results>
>
> >  * For the range of 2^40+1 to 2^46 I am uncomfortable to have it
> > available per default, especially if we don't at least spot check the
> > values via doctesting and it would be getting slow to do so - even for
> > #long. But we could add some keyword to force the upper limit up to a
> > 2^46 - the issue should be revisited post 3.4.2 - maybe even
> > implementing a better algorithm?
>
> I personally can't see the point in stopping the algorithm working at
> 2^40, if it does work at 2^46. I realise you can't specifically test
> 2^46 on every occasion, but surely that argument could apply to sine,
> cosine and every other function that exists. It's impractical to check
> every single value that might be thrown at it. Of course, if there is
> reason to believe the algorithm will fail, rather than just become very
> slow, then there is good reason for putting a limit.
>
> >  * In 3.4.1 prime_pi() was completely broken for even 2^35 because len
> > (prime_range(2^35)) aborts on sage.math since pari fails to allocate
> > 124 *GB* of memory.
>
> Em, but a failure to allocate sufficient memory should not cause a seg
> fault - whether or not the memory allocation is sensible or not.

Yeah,  tell me. Either pari and/or Sage's pari interface sucks. It is
absolutely ridiculous that pari seems to require that much memory, but
it wouldn't be the first time we find an absolutely insane memory leak
in pari.

> Perhaps this is why you are intending putting a limit. I can understand
> that.

We are talking about two different limits here.

Cheers,

Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to