-
-
Notifications
You must be signed in to change notification settings - Fork 52
Pretesting Plans and T Levels
This page explains two concepts that come up a lot when using factor():
- What a t-level means.
- How the
plan=option decides how much ECM pretesting to do before launching NFS or SIQS.
A number that has received "t30" has had enough ECM curves run on it so that the probability a 30-digit factor was missed is exp(-1) ≈ 37%.
Similarly, t35 means 35-digit factors are missed about 37% of the time at that effort level. (And at t35, a 30-digit factor would only be missed about 5% of the time.)
T-levels are computed from tabulated data extracted by A. Schindel from GMP-ECM in verbose mode. See also the GMP-ECM README.
The terminology is not universally accepted, but it is widely used (e.g. on mersenneforum.org) and it's a handy shorthand for "how much ECM has this number had."
When factor() decides whether to keep doing ECM or to hand off to NFS/SIQS, it's reasoning in t-levels: more ECM at higher B1 brings the t-level up, with diminishing returns. At some point the expected time to find another factor with ECM exceeds the cost of just finishing the job with NFS, so NFS wins.
If you have already run ECM on a number outside of YAFU (or in a previous session), pass -work N to assert "this input has already received t-level N of pretesting." Then factor() will pick up from there instead of redoing it.
-
-work 35→ input has had t35 of pretesting. -
-work 0.1on a 213-digit input → treated as21.3(a fraction of input size).
factor() decides how deep to pretest with ECM as a fraction of the input's digit size. The plan= option (or -plan flag) picks the ratio.
| Plan | Pretest depth (as fraction of input size) | Notes |
|---|---|---|
none |
0 | Only trial division and rho. |
noecm |
— | Skip ECM entirely; go to NFS/SIQS. |
light |
2/9 (≈ 0.222) | Less ECM; sooner to NFS. |
normal |
4/13 (≈ 0.308) | The default. |
deep |
1/3 (≈ 0.333) | More ECM before NFS. |
custom |
pretest_ratio |
Whatever you set. |
So with plan=normal, a 100-digit composite would be pretested to about t30 before NFS kicks in. With plan=deep it would be pretested to about t33.
pretest_ratio is meaningful only when plan=custom. You can also set pretest_ratio in yafu.ini to use a custom default ratio that overrides whichever plan name is in effect (depending on how you read the comment in yafu.ini — the named plans are the standard way).
If your input has a special (SNFS) form, and you're using one of the default plans, and you haven't passed gnfs, then factor() automatically reduces the ECM pretesting before switching to SNFS — SNFS is so much faster than GNFS that the trade-off shifts.
If you only want pretesting (no NFS/SIQS at the end), use:
yafu "factor(<n>)" -pretest [max_digits_or_t_level]The optional argument caps how deep YAFU will go.
See the factor() entry for the complete list of related options.