> On Apr 5, 2016, at 09:54 , Harald Schilly <[email protected]> wrote: > > the division changes the type to a rational number. I.e. > > type(q) > <type 'sage.rings.rational.Rational'> > > and > > is_prime(Integer(q)) > True > > fixes this. Not sure if that's a bug. It's certainly not obvious why this > happens.
I’m not sure this will help, but in Magma: > p1:=211859; > > q:=(p1-1)/2; > p1; 211859 > q; 105929 > IsPrime(p1); true > IsPrime(q); false > Type(p1); RngIntElt > Type(q); FldRatElt > IsPrime(ZZ!q); true At least, we’re in “good company”… Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
