mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GMP-ECM (https://www.mersenneforum.org/forumdisplay.php?f=55)
-   -   Formula entry enhancement? (https://www.mersenneforum.org/showthread.php?t=9087)

 Xyzzy 2007-08-21 23:01

Formula entry enhancement?

We like how in GMP-ECM you can tell it to use a formula, instead of having to use the decimal expansion like it used to be.

What we think would be cool is if the program would show the first 3 digits and then the last 3 digits of the number, or some arbitrary number of digits, to verify that the formula is typed in properly. (In our case we use bc to make sure the number is right but we have no idea if what GMP-ECM is using is right, other than the number of digits listed in the output.)

For example, one of the lists we have has the first few digits printed, so you are pretty sure you have the right thing typed in if those digits match. Since we sometimes have to divide out 3 or more huge factors the chance of us typing the number wrong is pretty good, since we can barely type to begin with.

So maybe the output would look like this:

Input number is (12^229-1)/841357 (242 digits) (161...843)
Using B1=850000000, B2=15892628251516, polynomial Dickson(30), sigma=2176429102
[/code]Dumb idea?

:unsure:

 xilman 2007-08-22 11:59

[QUOTE=Xyzzy;112807]We like how in GMP-ECM you can tell it to use a formula, instead of having to use the decimal expansion like it used to be.

What we think would be cool is if the program would show the first 3 digits and then the last 3 digits of the number, or some arbitrary number of digits, to verify that the formula is typed in properly. (In our case we use bc to make sure the number is right but we have no idea if what GMP-ECM is using is right, other than the number of digits listed in the output.)

For example, one of the lists we have has the first few digits printed, so you are pretty sure you have the right thing typed in if those digits match. Since we sometimes have to divide out 3 or more huge factors the chance of us typing the number wrong is pretty good, since we can barely type to begin with.

So maybe the output would look like this:

Input number is (12^229-1)/841357 (242 digits) (161...843)
Using B1=850000000, B2=15892628251516, polynomial Dickson(30), sigma=2176429102
[/code]Dumb idea?

:unsure:[/QUOTE]
Sounds like an excellent idea to us!

Paul

 Andi47 2007-08-22 12:17

[QUOTE=xilman;112819]Sounds like an excellent idea to us!

Paul[/QUOTE]

I agree. And it would be even better if the resulting number is checked if it's an integer:
A typo in one of the (long) factors which are to be divided out before ECMing, the parser cuts off the digits behind the decimal point after the division, and then I wonder why the number is divilible by things like 2[sup]4[/sup]*3*5²*17 (or even worse, if it is NOT divisible by such small stuff and the first "factor" is e.g. a p37 which looks quite ok, but in fact is nonsense....)

 R.D. Silverman 2007-08-22 14:20

[QUOTE=xilman;112819]Sounds like an excellent idea to us!

Paul[/QUOTE]

I disagree. You are putting the onus on the GMP authors to provide
a formula interpreter for (possibly) a very large set of different formulae.

Instead, if a particular user has some fomula he wants evaluated, let
HIM write the code to evaluate the formula and then have that code
call GMP-ECM with the desired number.

Are ALL of the ECM users too lazy to be bothered writing even a little
bit of code????

 axn 2007-08-22 15:24

[QUOTE=R.D. Silverman;112825]I disagree. You are putting the onus on the GMP authors to provide
a formula interpreter for (possibly) a very large set of different formulae.[/QUOTE]
:ermm: The formula interpreter is already there in gmp-ecm. OP was requesting for a feedback display of the digits so that the user can confirm that the formula was correctly entered.

 xilman 2007-08-22 19:54

[QUOTE=axn1;112830]:ermm: The formula interpreter is already there in gmp-ecm. OP was requesting for a feedback display of the digits so that the user can confirm that the formula was correctly entered.[/QUOTE]Exactly!

Given that the code is there already, an extremely simple validator for its input would appear to be well worth the investment required to write that validator --- especially as the code to produce the decimal representation is also present in ECM already.

Paul

 All times are UTC. The time now is 16:43.