head 1.1; branch 1.1.1; access; symbols netbsd-10-2-RELEASE:1.1.1.1 netbsd-11-0-RELEASE:1.1.1.2 netbsd-11-0-RC7:1.1.1.2 netbsd-11-0-RC6:1.1.1.2 netbsd-11-0-RC5:1.1.1.2 netbsd-11-0-RC4:1.1.1.2 netbsd-11-0-RC3:1.1.1.2 netbsd-11-0-RC2:1.1.1.2 netbsd-11-0-RC1:1.1.1.2 perseant-exfatfs-base-20250801:1.1.1.2 netbsd-11:1.1.1.2.0.4 netbsd-11-base:1.1.1.2 netbsd-10-1-RELEASE:1.1.1.1 mpfr-4-2-1:1.1.1.2 perseant-exfatfs-base-20240630:1.1.1.2 perseant-exfatfs:1.1.1.2.0.2 perseant-exfatfs-base:1.1.1.2 netbsd-10-0-RELEASE:1.1.1.1 netbsd-10-0-RC6:1.1.1.1 netbsd-10-0-RC5:1.1.1.1 netbsd-10-0-RC4:1.1.1.1 netbsd-10-0-RC3:1.1.1.1 netbsd-10-0-RC2:1.1.1.1 netbsd-10-0-RC1:1.1.1.1 mpfr-4-2-0:1.1.1.2 netbsd-10:1.1.1.1.0.6 netbsd-10-base:1.1.1.1 cjep_sun2x-base1:1.1.1.1 cjep_sun2x:1.1.1.1.0.4 cjep_sun2x-base:1.1.1.1 cjep_staticlib_x-base1:1.1.1.1 cjep_staticlib_x:1.1.1.1.0.2 cjep_staticlib_x-base:1.1.1.1 mpfr-4-1-0:1.1.1.1 mpfr:1.1.1; locks; strict; comment @# @; 1.1 date 2020.09.26.07.25.42; author mrg; state Exp; branches 1.1.1.1; next ; commitid uDXWuNicgnpBNwpC; 1.1.1.1 date 2020.09.26.07.25.42; author mrg; state Exp; branches; next 1.1.1.2; commitid uDXWuNicgnpBNwpC; 1.1.1.2 date 2023.03.05.22.08.38; author mrg; state Exp; branches; next ; commitid AcBV1jKMu2z25ZfE; desc @@ 1.1 log @Initial revision @ text @How to compile GNU MPFR with mini-gmp ===================================== To build and test MPFR against mini-gmp: ./configure --with-mini-gmp=DIR [other configure options] make make check where DIR is the directory that contains mini-gmp (for example .../gmp-6.2.0/mini-gmp). "make" will build mini-gmp with the same compiler as for MPFR. For "make check", tests that use features not supported by mini-gmp (mpq_t, mpf_t, and the gmp_*printf functions) are skipped. Note: To use this version of the MPFR library, you need to define the MPFR_USE_MINI_GMP macro before including mpfr.h (alternatively, you can modify mpfr.h to define this macro at the beginning, though this is discouraged). And since mini-gmp currently does not provide random functions, you also need to define the gmp_randstate_t type with typedef long int gmp_randstate_t[1]; before including mpfr.h (or you may want to modify mini-gmp.h). Remark: The random functions provided by MPFR configured with mini-gmp use the POSIX lrand48() and srand48() functions (the platform needs to provide them), thus one should avoid mini-gmp if one needs some really serious random functions. Another consequence is that these functions are not thread-safe. This was tested with MPFR svn r13974 and GMP 6.2.0 on x86_64 GNU/Linux: ============================================================================ Testsuite summary for MPFR 4.1.0-dev ============================================================================ # TOTAL: 183 # PASS: 172 # SKIP: 11 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ How to use mini-gmp with reduced limb size ========================================== Following the idea of Micro-GMP [1], the GMP developers have adapted mini-gmp so that it can be used with a reduced limb size. For that, you need GMP 6.2.0 (or later) and define the MINI_GMP_LIMB_TYPE macro with the associated base type, e.g. -DMINI_GMP_LIMB_TYPE=char (in practice, 8 bits) -DMINI_GMP_LIMB_TYPE=short (in practice, 16 bits) -DMINI_GMP_LIMB_TYPE=int (in practice, 32 bits) For example: ./configure --with-mini-gmp=DIR CFLAGS="-DMINI_GMP_LIMB_TYPE=int" This was tested with MPFR svn r13974 and GMP 6.2.0 on x86_64 GNU/Linux: ============================================================================ Testsuite summary for MPFR 4.1.0-dev ============================================================================ # TOTAL: 183 # PASS: 172 # SKIP: 11 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ [1] https://members.loria.fr/PZimmermann/talks/microgmp.pdf @ 1.1.1.1 log @GNU mpfr 4.1.0. main changes from 4.0: Changed __float128 to the type _Float128 specified in ISO/IEC TS 18661. __float128 is used as a fallback if _Float128 is not supported. New function mpfr_get_str_ndigits about conversion to a string of digits. New function mpfr_dot for the dot product (incomplete, experimental). New functions mpfr_get_decimal128 and mpfr_set_decimal128 (available only when MPFR has been built with decimal float support). New function mpfr_cmpabs_ui. New function mpfr_total_order_p for the IEEE 754 totalOrder predicate. The mpfr_out_str function now accepts bases from -2 to -36, in order to follow mpfr_get_str and GMP's mpf_out_str functions (these cases gave an assertion failure, as with other invalid bases). Shared caches: cleanup; really detect lock failures (abort in this case). Improved mpfr_add and mpfr_sub when all operands have a precision equal to twice the number of bits per word, e.g., 128 bits on a 64-bit platform. Optimized the tuning parameters for various architectures. @ text @@ 1.1.1.2 log @initial import of MPFR 4.2.0. changes from 4.1.0 include: Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes in the behavior of the formatted output functions may be visible, regarded as underspecified behavior or bug fixes (see below). New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu, mpfr_atanu and mpfr_atan2u. New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi, mpfr_atanpi and mpfr_atan2pi. New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and mpfr_compound_si. New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for mpfr_pow_sj). Bug fixes. - In particular, for the formatted output functions (mpfr_printf, etc.), the case where the precision consists only of a period has been fixed to be like .0 as specified in the ISO C standard, and the manual has been corrected and clarified. - The macros of the custom interface have also been fixed: they now behave like functions (except a minor limitation for mpfr_custom_init_set). @ text @d30 4 a33 3 use the standard rand() function, thus one should avoid mini-gmp if one needs some really serious random functions. Another consequence is that these functions may not be thread-safe. d35 1 a35 3 The build with mini-gmp may require ISO C99+ features, such as "long long". This was tested with revision 39ac9e4 and GMP 6.2.0 on x86_64 GNU/Linux: d64 1 a64 1 This was tested with revision 39ac9e4 and GMP 6.2.0 on x86_64 GNU/Linux: @