mersenneforum.org Formula entry enhancement?
 Register FAQ Search Today's Posts Mark Forums Read

 2007-08-21, 23:01 #1 Xyzzy     Aug 2002 210316 Posts 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: Code: GMP-ECM 6.1.1 [powered by GMP 4.2.1] [ECM] Input number is (12^229-1)/841357 (242 digits) (161...843) Using B1=850000000, B2=15892628251516, polynomial Dickson(30), sigma=2176429102 Dumb idea?
2007-08-22, 11:59   #2
xilman
Bamboozled!

"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across

22·3·941 Posts

Quote:
 Originally Posted by Xyzzy 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: Code: GMP-ECM 6.1.1 [powered by GMP 4.2.1] [ECM] Input number is (12^229-1)/841357 (242 digits) (161...843) Using B1=850000000, B2=15892628251516, polynomial Dickson(30), sigma=2176429102 Dumb idea?
Sounds like an excellent idea to us!

Paul

2007-08-22, 12:17   #3
Andi47

Oct 2004
Austria

2·17·73 Posts

Quote:
 Originally Posted by xilman Sounds like an excellent idea to us! Paul
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 24*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....)

Last fiddled with by Andi47 on 2007-08-22 at 12:17

2007-08-22, 14:20   #4
R.D. Silverman

Nov 2003

22×5×373 Posts

Quote:
 Originally Posted by xilman Sounds like an excellent idea to us! Paul
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????

2007-08-22, 15:24   #5
axn

Jun 2003

23×233 Posts

Quote:
 Originally Posted by R.D. Silverman 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.
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.

2007-08-22, 19:54   #6
xilman
Bamboozled!

"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across

22×3×941 Posts

Quote:
 Originally Posted by axn1 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.
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

 Similar Threads Thread Thread Starter Forum Replies Last Post Jayder mersennewiki 7 2013-03-04 04:52 chris2be8 GMP-ECM 0 2009-12-08 18:19 petrw1 PrimeNet 2 2007-10-16 19:13 delta_t PSearch 2 2006-05-21 07:05 Reboot It Software 34 2003-05-29 11:31

All times are UTC. The time now is 20:13.

Wed May 18 20:13:59 UTC 2022 up 34 days, 18:15, 0 users, load averages: 1.34, 1.67, 1.64