mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GMP-ECM (https://www.mersenneforum.org/forumdisplay.php?f=55)
-   -   How exactly does the -I option work? (https://www.mersenneforum.org/showthread.php?t=11357)

Andi47 2009-01-17 09:02

How exactly does the -I option work?
 
I just tried

[code]ecm -nn -c 100 -I 1 <ecm.txt 5e4 >>out1.txt[/code]

The first two curves were done on B1 = 50000 and B1 = 51108 resp., thus indicating a multiplicator of approx. 1.022.

The last two curves were done on B1 = 185663 and B1 = 187373 resp., thus indicating a multiplicator of approx. 1.009.

So how exactly is the increment calculated?

henryzz 2009-01-17 09:35

[code]double
calc_B1_AutoIncrement (double cur_B1, double incB1val, int calcInc)
{
const double const_adj = 1.33;
double B1Mod;
if (!calcInc)
return cur_B1 + incB1val; /* incB1val is a constant to add to B1 */

/* This simple table was "created" based upon the "Optimal B1 table"
in the README file */
if (cur_B1 < 2000.)
B1Mod = 200.;
else if (cur_B1 < 11000.) /* 30 curves from B1=2000 to 11000 */
{
B1Mod = 300. * (1. - ((cur_B1 - 2000.) / 9000.));
B1Mod +=433.334 * (1. - ((11000. - cur_B1) / 9000.));
}
else if (cur_B1 < 50000.) /* 90 curves from B1=11000 to 50000 */
{
B1Mod = 433.334 * (1. - ((cur_B1 - 11000.) / 39000.));
B1Mod +=833.334 * (1. - ((50000. - cur_B1) / 39000.));
}
else if (cur_B1 < 250000.) /* 240 curves from B1=50000 to 250000 */
{
B1Mod = 833.334 * (1. - ((cur_B1 - 50000.) / 200000.));
B1Mod +=1500. * (1. - ((250000. - cur_B1) / 200000.));
}
else if (cur_B1 < 1000000.) /* 500 curves from B1=250000 to 1e6 */
{
B1Mod = 1500. * (1. - ((cur_B1 - 250000.) / 750000.));
B1Mod +=1818.18182 * (1. - ((1000000. - cur_B1) / 750000.));
}
else if (cur_B1 < 3000000.) /* 1100 curves from B1=1e6 to 3e6 */
{
B1Mod = 1818.18182 * (1. - ((cur_B1 - 1000000.) / 2000000.));
B1Mod +=2758.621 * (1. - ((3000000. - cur_B1) / 2000000.));
}
else if (cur_B1 < 11000000.) /* 2900 curves from B1=3e6 to 11e6 */
{
B1Mod = 2758.621 * (1. - ((cur_B1 - 3000000.) / 8000000.));
B1Mod +=5818.18182 * (1. - ((11000000. - cur_B1) / 8000000.));
}
else if (cur_B1 < 43000000.) /* 5500 curves from B1=11e6 to 43e6 */
{
B1Mod = 5818.18182 * (1. - ((cur_B1 - 11000000.) / 32000000.));
B1Mod +=7444.44445 * (1. - ((43000000. - cur_B1) / 32000000.));
}
else if (cur_B1 < 110000000.) /* 9000 curves from B1=43e6 to 11e7 */
{
B1Mod = 7444.44445 * (1. - ((cur_B1 - 43000000.) / 67000000.));
B1Mod +=6818.18182 * (1. - ((110000000. - cur_B1) / 67000000.));
}
else if (cur_B1 < 260000000.) /* 22000 curves from B1=11e7 to 26e7 */
{
B1Mod = 6818.18182 * (1. - ((cur_B1 - 110000000.) / 150000000.));
B1Mod +=11346.1539 * (1. - ((260000000. - cur_B1) / 150000000.));
}
else if (cur_B1 < 850000000.) /* 52000 curves from B1=26e7 to 85e7 */
{
B1Mod = 11346.1539 * (1. - ((cur_B1 - 260000000.) / 590000000.));
B1Mod +=24698.8 * (1. - ((850000000. - cur_B1) / 590000000.));
}
else if (cur_B1 < 2900000000.) /* 83000 curves from B1=85e7 to 29e8 */
{
B1Mod = 24698.8 * (1. - ((cur_B1 - 850000000.) / 2050000000.));
B1Mod +=50000.0 * (1. - ((2900000000. - cur_B1) / 2050000000.));
}
else
B1Mod = 50000.;

return floor (cur_B1 + const_adj*(B1Mod*incB1val) + 0.5);
}
[/code]this is the code that does it in 6.2.1
edit: whoops copied an extra function

10metreh 2009-01-17 10:11

[quote=Andi47;159071]I just tried

[code]ecm -nn -c 100 -I 1 <ecm.txt 5e4 >>out1.txt[/code]

The first two curves were done on B1 = 50000 and B1 = 51108 resp., thus indicating a multiplicator of approx. 1.022.

The last two curves were done on B1 = 185663 and B1 = 187373 resp., thus indicating a multiplicator of approx. 1.009.

So how exactly is the increment calculated?[/quote]

I got my 1.2 estimate from B1 = 2e3. I didn't check to see if it changed.


All times are UTC. The time now is 12:11.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.