![]() |
|
|
#1 |
|
Jul 2021
2116 Posts |
I heard there was an effort to implement some functions of GMP using GWNUM. Is it true?
How can I re-compile GMP with such support enabled? Would be already great if at least Multiplication of very long integers will be implemented through gwnum. Does anyone have example of steps needed to re-compile GMP with gwnum? Windows and Linux versions are needed. |
|
|
|
|
|
#2 |
|
Sep 2002
Database er0rr
5·937 Posts |
I don't know about efforts to put GWNUM in GMP, but you could write your own functions like
Code:
gw_mul( mpz_t r, mpz_t a, mpz_t b ) {
...
}
Last fiddled with by paulunderwood on 2021-09-15 at 10:57 |
|
|
|
|
|
#3 |
|
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
7,823 Posts |
IIRC, GMP and its fork MPIR are entirely integer instruction based code for the multiword operations. From a philosophical stance that no imprecision was to be allowed in.
Gwnum, prime95, etc is rooted in the stance that while floating point is faster than integer on modern CPUs, managing round-off error is worth the effort to gain speed. Last fiddled with by kriesel on 2021-09-15 at 14:51 |
|
|
|
|
|
#4 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
100000010101112 Posts |
|
|
|
|
|
|
#5 |
|
"Alexander"
Nov 2008
The Alamo City
11110111112 Posts |
There's also the issue of licensing. gwnum's license is incompatible with the GPL (per the FSF's definition, it isn't even free, but that's irrelevant here). People have been known to link gwnum into GMP-ECM, and while compiling and linking for personal use is OK under the GPL, redistributing those binaries is not. I'm not sure if the same restrictions would apply to GMP itself, which is dual-licensed under the GPL and LGPL, if you ever consider going that route.
|
|
|
|
|
|
#6 | |
|
Jun 2003
23·683 Posts |
Quote:
|
|
|
|
|
|
|
#7 | |
|
"Alexander"
Nov 2008
The Alamo City
991 Posts |
Quote:
And if you don't believe me, here are lines 897-903 from my (unmodified) SVN copy of main.c from GMP-ECM: Code:
#ifdef HAVE_GWNUM
#ifdef gwnum_is_gpl
if (! gwnum_is_gpl ())
#endif
printf ("Due to incompatible licenses, this binary file must not "
"be distributed.\n");
#endif
Last fiddled with by Happy5214 on 2021-09-22 at 04:09 |
|
|
|
|
|
|
#8 |
|
Jun 2003
23×683 Posts |
So... the restriction comes from gwnum license?
|
|
|
|
|
|
#9 |
|
"Alexander"
Nov 2008
The Alamo City
991 Posts |
Yes. The gwnum license requires any 100M-digit Mersenne primes found with gwnum to be credited to GIMPS and fall under their prize rules, even if the library is linked into a program other than Prime95/mprime, such as LLR (bad example, but you get the point). This is considered a "further restriction" on the recipient's freedom to use the software under section 10 of the GPL (it would necessarily apply to the combined package, even though GMP-ECM cannot perform record-breaking primality tests), thus preventing the code from being combined and distributed under the GPL only, as required under section 6.
Edit: Even if George were to grant a special license for GMP-ECM, the remainder of the existing license is murky enough to make its GPL compatibility status without the prize rule problematic. Last fiddled with by Happy5214 on 2021-09-22 at 09:38 Reason: Expand |
|
|
|
|
|
#10 |
|
Jun 2003
23×683 Posts |
Is that a gwnum license restriction or P95/mprime software restriction?
Can you (or someone) point to the gwnum license? I am looking at the source, and couldn't find anything obvious. |
|
|
|
|
|
#11 |
|
"Alexander"
Nov 2008
The Alamo City
3DF16 Posts |
AFAIK gwnum and Prime95/mprime have the same license. I don't see a license file in the gwnum source folder, but both LLR and OpenPFGW (which both link gwnum) reference similar terms.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GPL GWNUM | lavalamp | Software | 6 | 2020-12-11 07:53 |
| GWNUM | enzocreti | enzocreti | 22 | 2019-03-14 18:35 |
| LLR V3.8.2 using gwnum 26.2 is available! | Jean Penné | Software | 25 | 2010-11-01 15:18 |
| GWNUM? | Unregistered | Information & Answers | 3 | 2010-09-12 19:52 |
| GWNUM as DLL? | Cyclamen Persicum | Software | 1 | 2007-01-02 20:53 |