We are using flint:

if mpz_fits_slong_p(n.value):
    ....
    n_factor(&f, mpz_get_ui(n.value), proof)

where n_factor is defined in sage.libs.flint.ulong_extras.

David


On Wed, Jun 18, 2014 at 4:28 AM, John Cremona <john.crem...@gmail.com>
wrote:

> I noticed an announcement on the flint-dev list which led me to try
> this, and indeed we have the bug:
>
> sage: n=2007193456621
> sage: n.is_prime()
> False
> sage: n.factor()                 # !!!!!!!!!!
> 2007193456621
> sage: pari(n).factor()
> [1001797, 1; 2003593, 1]
> sage: n == 1001797 * 2003593
> True
>
> See flint-dev for more details, but this seems serious enough to
> report here too.  I do not understand why Sage fails to factor n since
> the documentation says that pari is the default, and pari can factor
> this n (as above), however:
>
> sage: n.factor(algorithm='pari')
> 2007193456621
>
> but
>
> sage: from sage.rings.factorint import factor_using_pari
> sage: factor_using_pari(n)
> [(1001797, 1), (2003593, 1)]
>
> so something is going wrong before pari is getting called, perhaps a
> primality test?
>
> John
>
> --
> 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 http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to