# Revision history [back]

It seems to work for me:

sage: load "exp.spyx"
Compiling exp.spyx...
sage: time pollard_rho(next_prime(10**6)*previous_prime(10**7))
CPU times: user 0.23 s, sys: 0.01 s, total: 0.23 s
Wall time: 0.24 s
1000003


I'm a little puzzled, though, because the error message you show doesn't seem to correspond to the line in your source, namely that in the code you put up it says "sage.all.mod(sage.all.mod(y,n)**2+1,n)**2+1" but the error message points to a line of code reading 2+1,n)**2+1", but the error message is pointing to y = sage.all.mod(sage.mod(y,n)**2+1,n)**2+1, without an ".all." between sage and mod, so it seems to be looking in the module "sage" for the function mod.

For what it's worth, that's exactly the error message I get if I remove the ".all".

It seems to work for me:

sage: load "exp.spyx"
Compiling exp.spyx...
sage: time pollard_rho(next_prime(10**6)*previous_prime(10**7))
CPU times: user 0.23 s, sys: 0.01 s, total: 0.23 s
Wall time: 0.24 s
1000003


I'm a little puzzled, though, because the error message you show doesn't seem to correspond to the line in your source, namely that in the code you put up it says "sage.all.mod(sage.all.mod(y,n)**2+1,n)**2+1" but the error message points to a line of code reading 2+1,n)**2+1", but the error message is pointing to "y = sage.all.mod(sage.mod(y,n)**2+1,n)**2+1, ", without an ".all." between sage and mod, so it seems to be looking in the module "sage" for the function mod.

For what it's worth, that's exactly the error message I get if I remove the ".all".
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5413141250610352, "perplexity": 2467.565472617204}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-06/segments/1674764500303.56/warc/CC-MAIN-20230206015710-20230206045710-00104.warc.gz"}