| Deutsch English Français Italiano |
|
<vqq9ba$267fp$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: Python recompile Date: Tue, 11 Mar 2025 21:18:34 +0000 Organization: A noiseless patient Spider Lines: 73 Message-ID: <vqq9ba$267fp$1@dont-email.me> References: <vq1qas$j22$1@gallifrey.nk.ca> <vq6j5h$1qosf$1@dont-email.me> <20250304092827.708@kylheku.com> <vq7g1p$1vmg5$1@dont-email.me> <vq94dt$2boso$1@dont-email.me> <vqcsk7$23bfo$1@paganini.bofh.team> <vqefn1$3flpt$1@dont-email.me> <vqeu5c$3imil$1@dont-email.me> <vqeun4$3iqbq$1@dont-email.me> <vqfcbe$3lkkc$1@dont-email.me> <871pv861ht.fsf@nosuchdomain.example.com> <20250308192940.00001351@yahoo.com> <vqi1ge$8jg8$1@dont-email.me> <vqmgjv$3a2il$1@paganini.bofh.team> <vqn4dn$1eb9s$1@dont-email.me> <vqo3ss$3hkas$1@paganini.bofh.team> <vqph2e$203bs$2@dont-email.me> <vqpjh7$210q9$1@dont-email.me> <vqpo1s$222s0$1@dont-email.me> <vqpqo6$23197$1@dont-email.me> <vqpsvc$23gc1$1@dont-email.me> <vqq5um$25dm2$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 11 Mar 2025 22:18:35 +0100 (CET) Injection-Info: dont-email.me; posting-host="e0b1512e31c88b1cbe05a7f62cb3028b"; logging-data="2301433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YaoNda2aOzT88TEc1nCuX" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:jqt4OcEpWj4Y6cgTysSgj1QZQYY= Content-Language: en-GB In-Reply-To: <vqq5um$25dm2$1@dont-email.me> Bytes: 4198 On 11/03/2025 20:20, David Brown wrote: > On 11/03/2025 18:47, bart wrote: >>> <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-gmp> >>> <https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-libffi> >>> >>> The compressed tarballs include the dlls. >> >> I downloaded a couple of large files, including mingw64-x86_64- >> gmp-6.3.0-1-src.tar, but found no trace of any DLL files. > > You downloaded the source tarballs, and are surprised to find they > contain source files - not binaries? Did the abbreviation "src" not > give you a clue? You said the 'tarballs include the dlls'. I associate tarballs with source code, so I was mildly surprised, but I looked anyway. The other file was mingw-packages.master.zip, but it would have taken forever to unzip the lot looking for one file that probably wasn't there. > > Try the link that is labelled "File:" - it is the msys2/mingw-w64 > tarball with libgmp-10.dll and all the other files shown in the list at > the bottom of the page, under "Files:". So: https://mirror.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gmp-6.3.0-2-any.pkg.tar.zst, obviously. >> Meanwhile here is the library *I* had to use instead: >> >> https://github.com/sal55/langs/tree/master/bignum >> > > It is not exactly comparable, is it? No. Mine was available when I needed it a decade or so ago. GMP dlls were everywhere, mostly on dodgy-looking sites but every one was different. Then you had the job of finding a matching gmp.h file. > If all you need is some simple arithmetic done in a naïve school long > multiplication way, then the code is fine. I needed support for big numbers in my interpreter. My product is well-integrated, and represents 5% of the 250KB interpreter size. The above gmp DLL is 666KB so is a poor match. > Your code is a reasonably > clear and straightforward implementation of that. If you have no need > of more than that, there is little point in going for something as > powerful as GMP - it is probably faster to write such code than it is to > learn how to use GMP. My library has some special features such as using decimal, and supporting arbitrary floating point within the same type. This is it in use within my scripting language: a := 2e1'000'000'000L b := 3e1'000'000'000L println a+b println a*b println a/b Output is: 5.0e1000000000 6.0e2000000000 0.666666...666 (default precision is 300 decimals)