On Fri, May 1, 2009 at 5:13 PM, mabshoff <mabsh...@googlemail.com> wrote: > > While going over the open tickets in 4.0 I noticed this ticket: > > #5943 (Sage 3.4.2.a0: prime_pi(2^50) segfaults) > > If someone could take a stab at that it would be nice since that is > brand new code and ought to be a little bit more stable than that. I > am waiting on a fix for #5952 in the morning, i.e. Saturday, so some > hero might want to earn some brownie points over night :) >
Brownies are overrated. I played around with prime_pi() for a while, both on sage.math and on my laptop at the office (macbook running 32-bit archlinux). I didn't manage to get a segfault on either machine with prime_pi(2^50). I guess that's the good news? Anyway, the bad news is that the answers returned do not agree between the two machines, e.g. {{{ # on sage.math sage: time prime_pi(2^50) CPU times: user 4854.46 s, sys: 3.17 s, total: 4857.63 s Wall time: 4857.73 s 33483379603407 # # on my laptop sage: time prime_pi(2^50) CPU times: user 5555.60 s, sys: 7.81 s, total: 5563.40 s Wall time: 5598.64 s 21969300962685 }}} I'm pretty sure that the sage.math answer is more likely to be the right one. You can maybe guess from the timings why I didn't try prime_pi(2^51). I have, however, tried smaller values. I'm going to put that data up on the trac ticket. I have absolutely no idea what's wrong, but something definitely is, and hopefully this will help someone fix it. Best, Alex -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---