[fpc-devel] Please include gmp.dll in Win32 distribution of FPC 2.6.2 and later

Alexander Klenin klenin at gmail.com
Sun Dec 2 13:35:57 CET 2012


On Sun, Dec 2, 2012 at 2:42 PM, Michael Van Canneyt
<michael at freepascal.org> wrote:
>> Writing high-quality arbitrary precision arithmetics is hard.
>> The fact that Free Pascal uses GMP instead of homegrown solution has
>> actually earned some praise.
>
> Define homegown ? GMP most likely also is homegrown, as a lot of open source
> was started homegrown :-)

GMP is widely used, well known and tested, it also has good performance.
Of course, this does not prevent us from writing our own
implementation of similar quality,
but it is not simple at all -- for example, Python went this way and
their implementation
is often criticized as too slow even for interpreted language.

>
> I did a search. There seem to be at least 2, bigint and MPArith.
> The latter seems still maintained. The former may be easier to pick up and
> include.
I have found several pascal libraries named "bigint", but they all
turned out to be complete garbage.
MPArith on the other hand makes a very good impression.
It has Zlib license which is GPL-compatible.
I have found some Intel-specific inline assembler in the source, but
it seems a workaround would be simple.
MPArith also lacks operator overloads, but those are also simple to add.
So I think that there is no obstacle for including it. I Cc'ed the
author to get his opinion.

>> In short term, however, adding gmp.dll in 2.6.2 release will make it
>> available at least
>> for upcoming Russian Olympiad in Informatics.
> Well, 2.6.2 is at RC1 stage, so that will not happen, I suppose.
This is a simple file addition, it has zero chance of breaking
existing functionality.

> In the short term, it might be easier to convince them to install the
> library on the machines that are used for the Olympiad. You can explain the
> problem to them as well, I suppose. If they allow pascal and know that they
> will be asking an arbitrary math question, they could decide to play fair
> and put the library on the machine.

No chance, the rules are very strict in this regard.
As for fairness, the usual argument is "just solve problems in Java/Python",
which is exactly what I am trying to prevent :)

--
Alexander S. Klenin



More information about the fpc-devel mailing list