On Fri, Feb 5, 2016 at 9:50 AM, David Wong <debm...@gmail.com> wrote: > prime_number = bignumber / 2 > is_prime(prime_number) # -> False > > prime_number = bignumber // 2 > is_prime(prime_number) # -> True > > prime_number = ZZ(bignumber / 2) > is_prime(prime_number) # -> True > > > I've spent a couple of days arguing with people about a number (not) being a > prime. Turns out it fails silently if you're in the wrong field.
Was it the new SOCAT prime, related to the DH vulnerability? Because people are evidently hitting this very formal bad design decision in Sage left and right as a result... > > I guess a fix would be to ZZ() the number first in the function is_prime. If > you guys agree I can submit a patch or something (never touched at Sage's > codebase and that would be a good opportunity) > > David > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.