Welcome to ftp.nluug.nl Current directory: /NetBSD/NetBSDrelease10/src/external/lgpl3/gmp/dist/minigmp/ 

Contents of README:Copyright 20112013, 2018 Free Software Foundation, Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify it under the terms of either: * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. or * the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. or both in parallel, as here. The GNU MP Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. This is "minigmp", a small implementation of a subset of GMP's mpn, mpz and mpq interfaces. It is intended for applications which need arithmetic on numbers larger than a machine word, but which don't need to handle very large numbers very efficiently. Those applications can include a copy of minigmp to get a GMPcompatible interface with small footprint. One can also arrange for optional linking with the real GMP library, using minigmp as a fallback when for some reason GMP is not available, or not desired as a dependency. The supported GMP subset of the mpn and mpz interfaces is declared in minigmp.h, and implemented in minigmp.c. The implemented functions are fully compatible with the corresponding GMP functions, as specified in the GMP manual, with a few exceptions: mpz_export and mpz_import support only NAILS = 0. The REALLOC_FUNC and FREE_FUNC registered with mp_set_memory_functions does not get the correct size of the allocated block in the corresponding argument. minigmp always passes zero for these rarely used arguments. When mpz_get_str allocates the block, it can be longer than needed. The performance target for minigmp is to be at most 10 times slower than the real GMP library, for numbers of size up to a few hundred bits. No asymptotically fast algorithms are included in minigmp, so it will be many orders of magnitude slower than GMP for very large numbers. The supported GMP subset of the mpq layer is declared in minimpq.h, and implemented in minimpq.c. You should never "install" minigmp. Applications can either just #include minigmp.c (but then, beware that it defines several macros and functions outside of the advertised interface), and if needed #include minimpq.c in a later line (order is important). Or compile minigmp.c and minimpq.c as separate compilation units, and use the declarations in minigmp.h and minimpq.h. The tests subdirectory contains a testsuite. To use it, you need GMP and GNU make. Just run make check in the tests directory. If the hardcoded compiler settings are not right, you have to either edit the Makefile or pass overriding values on the make command line (e.g., make CC=cc check). The initial version of minigmp was put together by Niels MÃ¶ller <nisse@lysator.liu.se>, with a fair amount of copyandpaste from the GMP sources. 
Name Last modified Size
Parent Directory  CVS/ 17Dec2022 21:37  tests/ 17Dec2022 21:35  ChangeLog 11Jul2021 23:14 21K README 27Sep2020 02:27 3.3K minigmp.c 11Jul2021 23:14 88K minigmp.h 11Jul2021 23:14 11K minimpq.c 11Jul2021 23:14 11K minimpq.h 27Sep2020 02:27 3.9K
NLUUG  Open Systems. Open Standards
Become a member
and get discounts on conferences and more, see the NLUUG website!