Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/lgpl3/mpfr/dist merge MPFR 3.1.2. changes to moved...
details: https://anonhg.NetBSD.org/src/rev/d53650934fa4
branches: trunk
changeset: 791691:d53650934fa4
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Nov 28 12:35:03 2013 +0000
description:
merge MPFR 3.1.2. changes to moved srcs are already merged.
diffstat:
external/lgpl3/mpfr/dist/FAQ.html | 389 -
external/lgpl3/mpfr/dist/Makefile.in | 1553 +---
external/lgpl3/mpfr/dist/VERSION | 2 +-
external/lgpl3/mpfr/dist/abort_prec_max.c | 32 -
external/lgpl3/mpfr/dist/acos.c | 144 -
external/lgpl3/mpfr/dist/acosh.c | 156 -
external/lgpl3/mpfr/dist/add.c | 107 -
external/lgpl3/mpfr/dist/add1.c | 535 -
external/lgpl3/mpfr/dist/add1sp.c | 384 -
external/lgpl3/mpfr/dist/add_d.c | 49 -
external/lgpl3/mpfr/dist/add_ui.c | 53 -
external/lgpl3/mpfr/dist/agm.c | 314 -
external/lgpl3/mpfr/dist/ai.c | 283 -
external/lgpl3/mpfr/dist/ansi2knr.1 | 36 -
external/lgpl3/mpfr/dist/ansi2knr.c | 739 --
external/lgpl3/mpfr/dist/asin.c | 123 -
external/lgpl3/mpfr/dist/asinh.c | 117 -
external/lgpl3/mpfr/dist/atan.c | 435 -
external/lgpl3/mpfr/dist/atan2.c | 257 -
external/lgpl3/mpfr/dist/atanh.c | 127 -
external/lgpl3/mpfr/dist/bernoulli.c | 80 -
external/lgpl3/mpfr/dist/buildopt.c | 44 -
external/lgpl3/mpfr/dist/cache.c | 145 -
external/lgpl3/mpfr/dist/cbrt.c | 148 -
external/lgpl3/mpfr/dist/check.c | 80 -
external/lgpl3/mpfr/dist/clear.c | 31 -
external/lgpl3/mpfr/dist/clears.c | 61 -
external/lgpl3/mpfr/dist/cmp.c | 104 -
external/lgpl3/mpfr/dist/cmp2.c | 243 -
external/lgpl3/mpfr/dist/cmp_abs.c | 94 -
external/lgpl3/mpfr/dist/cmp_d.c | 38 -
external/lgpl3/mpfr/dist/cmp_ld.c | 38 -
external/lgpl3/mpfr/dist/cmp_si.c | 101 -
external/lgpl3/mpfr/dist/cmp_ui.c | 101 -
external/lgpl3/mpfr/dist/comparisons.c | 78 -
external/lgpl3/mpfr/dist/config.guess | 255 +-
external/lgpl3/mpfr/dist/configure.in | 495 -
external/lgpl3/mpfr/dist/const_catalan.c | 152 -
external/lgpl3/mpfr/dist/const_euler.c | 221 -
external/lgpl3/mpfr/dist/const_log2.c | 192 -
external/lgpl3/mpfr/dist/const_pi.c | 120 -
external/lgpl3/mpfr/dist/constant.c | 28 -
external/lgpl3/mpfr/dist/copysign.c | 38 -
external/lgpl3/mpfr/dist/cos.c | 296 -
external/lgpl3/mpfr/dist/cosh.c | 126 -
external/lgpl3/mpfr/dist/cot.c | 96 -
external/lgpl3/mpfr/dist/coth.c | 93 -
external/lgpl3/mpfr/dist/csc.c | 76 -
external/lgpl3/mpfr/dist/csch.c | 79 -
external/lgpl3/mpfr/dist/d_div.c | 49 -
external/lgpl3/mpfr/dist/d_sub.c | 49 -
external/lgpl3/mpfr/dist/digamma.c | 372 -
external/lgpl3/mpfr/dist/dim.c | 48 -
external/lgpl3/mpfr/dist/div.c | 678 -
external/lgpl3/mpfr/dist/div_2exp.c | 33 -
external/lgpl3/mpfr/dist/div_2si.c | 57 -
external/lgpl3/mpfr/dist/div_2ui.c | 59 -
external/lgpl3/mpfr/dist/div_d.c | 49 -
external/lgpl3/mpfr/dist/div_ui.c | 267 -
external/lgpl3/mpfr/dist/dump.c | 30 -
external/lgpl3/mpfr/dist/eint.c | 316 -
external/lgpl3/mpfr/dist/eq.c | 141 -
external/lgpl3/mpfr/dist/erf.c | 261 -
external/lgpl3/mpfr/dist/erfc.c | 276 -
external/lgpl3/mpfr/dist/exceptions.c | 336 -
external/lgpl3/mpfr/dist/exp.c | 162 -
external/lgpl3/mpfr/dist/exp10.c | 29 -
external/lgpl3/mpfr/dist/exp2.c | 146 -
external/lgpl3/mpfr/dist/exp3.c | 333 -
external/lgpl3/mpfr/dist/exp_2.c | 414 -
external/lgpl3/mpfr/dist/expm1.c | 174 -
external/lgpl3/mpfr/dist/extract.c | 55 -
external/lgpl3/mpfr/dist/factorial.c | 113 -
external/lgpl3/mpfr/dist/fdl.texi | 454 -
external/lgpl3/mpfr/dist/fits_intmax.c | 121 -
external/lgpl3/mpfr/dist/fits_s.h | 86 -
external/lgpl3/mpfr/dist/fits_sint.c | 28 -
external/lgpl3/mpfr/dist/fits_slong.c | 28 -
external/lgpl3/mpfr/dist/fits_sshort.c | 28 -
external/lgpl3/mpfr/dist/fits_u.h | 67 -
external/lgpl3/mpfr/dist/fits_uint.c | 27 -
external/lgpl3/mpfr/dist/fits_uintmax.c | 91 -
external/lgpl3/mpfr/dist/fits_ulong.c | 27 -
external/lgpl3/mpfr/dist/fits_ushort.c | 27 -
external/lgpl3/mpfr/dist/fma.c | 294 -
external/lgpl3/mpfr/dist/fms.c | 296 -
external/lgpl3/mpfr/dist/frac.c | 144 -
external/lgpl3/mpfr/dist/free_cache.c | 52 -
external/lgpl3/mpfr/dist/gamma.c | 417 -
external/lgpl3/mpfr/dist/gammaonethird.c | 191 -
external/lgpl3/mpfr/dist/gen_inverse.h | 106 -
external/lgpl3/mpfr/dist/get_d.c | 183 -
external/lgpl3/mpfr/dist/get_d64.c | 397 -
external/lgpl3/mpfr/dist/get_exp.c | 31 -
external/lgpl3/mpfr/dist/get_f.c | 148 -
external/lgpl3/mpfr/dist/get_flt.c | 123 -
external/lgpl3/mpfr/dist/get_ld.c | 215 -
external/lgpl3/mpfr/dist/get_patches.c | 29 -
external/lgpl3/mpfr/dist/get_patches.sh | 34 -
external/lgpl3/mpfr/dist/get_si.c | 69 -
external/lgpl3/mpfr/dist/get_sj.c | 137 -
external/lgpl3/mpfr/dist/get_str.c | 2554 -------
external/lgpl3/mpfr/dist/get_ui.c | 65 -
external/lgpl3/mpfr/dist/get_uj.c | 96 -
external/lgpl3/mpfr/dist/get_z.c | 61 -
external/lgpl3/mpfr/dist/get_z_exp.c | 79 -
external/lgpl3/mpfr/dist/gmp_op.c | 322 -
external/lgpl3/mpfr/dist/hypot.c | 187 -
external/lgpl3/mpfr/dist/ieee_floats.h | 76 -
external/lgpl3/mpfr/dist/init.c | 29 -
external/lgpl3/mpfr/dist/init2.c | 69 -
external/lgpl3/mpfr/dist/inits.c | 62 -
external/lgpl3/mpfr/dist/inits2.c | 66 -
external/lgpl3/mpfr/dist/inp_str.c | 87 -
external/lgpl3/mpfr/dist/int_ceil_log2.c | 42 -
external/lgpl3/mpfr/dist/isinf.c | 29 -
external/lgpl3/mpfr/dist/isinteger.c | 59 -
external/lgpl3/mpfr/dist/isnan.c | 29 -
external/lgpl3/mpfr/dist/isnum.c | 29 -
external/lgpl3/mpfr/dist/isqrt.c | 84 -
external/lgpl3/mpfr/dist/isregular.c | 29 -
external/lgpl3/mpfr/dist/iszero.c | 29 -
external/lgpl3/mpfr/dist/jn.c | 310 -
external/lgpl3/mpfr/dist/jyn_asympt.c | 269 -
external/lgpl3/mpfr/dist/li2.c | 632 -
external/lgpl3/mpfr/dist/lngamma.c | 637 -
external/lgpl3/mpfr/dist/log.c | 174 -
external/lgpl3/mpfr/dist/log10.c | 144 -
external/lgpl3/mpfr/dist/log1p.c | 152 -
external/lgpl3/mpfr/dist/log2.c | 136 -
external/lgpl3/mpfr/dist/logging.c | 165 -
external/lgpl3/mpfr/dist/min_prec.c | 61 -
external/lgpl3/mpfr/dist/minmax.c | 92 -
external/lgpl3/mpfr/dist/modf.c | 98 -
external/lgpl3/mpfr/dist/mp_clz_tab.c | 38 -
external/lgpl3/mpfr/dist/mparam_h.in | 1422 ---
external/lgpl3/mpfr/dist/mpf2mpfr.h | 175 -
external/lgpl3/mpfr/dist/mpfr-gmp.c | 386 -
external/lgpl3/mpfr/dist/mpfr-gmp.h | 312 -
external/lgpl3/mpfr/dist/mpfr-impl.h | 1790 -----
external/lgpl3/mpfr/dist/mpfr-longlong.h | 1938 -----
external/lgpl3/mpfr/dist/mpfr-thread.h | 48 -
external/lgpl3/mpfr/dist/mpfr.h | 944 --
external/lgpl3/mpfr/dist/mpfr.info | Bin
external/lgpl3/mpfr/dist/mpfr.texi | 3495 ---------
external/lgpl3/mpfr/dist/mpn_exp.c | 175 -
external/lgpl3/mpfr/dist/mul.c | 511 -
external/lgpl3/mpfr/dist/mul_2exp.c | 33 -
external/lgpl3/mpfr/dist/mul_2si.c | 56 -
external/lgpl3/mpfr/dist/mul_2ui.c | 63 -
external/lgpl3/mpfr/dist/mul_d.c | 49 -
external/lgpl3/mpfr/dist/mul_ui.c | 133 -
external/lgpl3/mpfr/dist/mulders.c | 117 -
external/lgpl3/mpfr/dist/neg.c | 39 -
external/lgpl3/mpfr/dist/next.c | 150 -
external/lgpl3/mpfr/dist/out_str.c | 98 -
external/lgpl3/mpfr/dist/pow.c | 679 -
external/lgpl3/mpfr/dist/pow_si.c | 250 -
external/lgpl3/mpfr/dist/pow_ui.c | 161 -
external/lgpl3/mpfr/dist/pow_z.c | 364 -
external/lgpl3/mpfr/dist/powerof2.c | 46 -
external/lgpl3/mpfr/dist/print_raw.c | 129 -
external/lgpl3/mpfr/dist/print_rnd_mode.c | 46 -
external/lgpl3/mpfr/dist/printf.c | 215 -
external/lgpl3/mpfr/dist/rec_sqrt.c | 552 -
external/lgpl3/mpfr/dist/reldiff.c | 73 -
external/lgpl3/mpfr/dist/rem1.c | 229 -
external/lgpl3/mpfr/dist/rint.c | 437 -
external/lgpl3/mpfr/dist/root.c | 199 -
external/lgpl3/mpfr/dist/round_near_x.c | 233 -
external/lgpl3/mpfr/dist/round_p.c | 123 -
external/lgpl3/mpfr/dist/round_prec.c | 231 -
external/lgpl3/mpfr/dist/round_raw_generic.c | 259 -
external/lgpl3/mpfr/dist/scale2.c | 91 -
external/lgpl3/mpfr/dist/sec.c | 34 -
external/lgpl3/mpfr/dist/sech.c | 40 -
external/lgpl3/mpfr/dist/set.c | 81 -
external/lgpl3/mpfr/dist/set_d.c | 255 -
external/lgpl3/mpfr/dist/set_d64.c | 224 -
external/lgpl3/mpfr/dist/set_dfl_prec.c | 41 -
external/lgpl3/mpfr/dist/set_exp.c | 37 -
external/lgpl3/mpfr/dist/set_f.c | 99 -
external/lgpl3/mpfr/dist/set_flt.c | 34 -
external/lgpl3/mpfr/dist/set_inf.c | 33 -
external/lgpl3/mpfr/dist/set_ld.c | 331 -
external/lgpl3/mpfr/dist/set_nan.c | 31 -
external/lgpl3/mpfr/dist/set_prc_raw.c | 31 -
external/lgpl3/mpfr/dist/set_prec.c | 55 -
external/lgpl3/mpfr/dist/set_q.c | 133 -
external/lgpl3/mpfr/dist/set_rnd.c | 40 -
external/lgpl3/mpfr/dist/set_si.c | 30 -
external/lgpl3/mpfr/dist/set_si_2exp.c | 73 -
external/lgpl3/mpfr/dist/set_sj.c | 66 -
external/lgpl3/mpfr/dist/set_str.c | 42 -
external/lgpl3/mpfr/dist/set_str_raw.c | 55 -
external/lgpl3/mpfr/dist/set_ui.c | 30 -
external/lgpl3/mpfr/dist/set_ui_2exp.c | 72 -
external/lgpl3/mpfr/dist/set_uj.c | 137 -
external/lgpl3/mpfr/dist/set_z.c | 30 -
external/lgpl3/mpfr/dist/set_z_exp.c | 180 -
external/lgpl3/mpfr/dist/set_zero.c | 31 -
external/lgpl3/mpfr/dist/setmax.c | 41 -
external/lgpl3/mpfr/dist/setmin.c | 38 -
external/lgpl3/mpfr/dist/setsign.c | 30 -
external/lgpl3/mpfr/dist/sgn.c | 40 -
external/lgpl3/mpfr/dist/si_op.c | 57 -
external/lgpl3/mpfr/dist/signbit.c | 30 -
external/lgpl3/mpfr/dist/sin.c | 180 -
external/lgpl3/mpfr/dist/sin_cos.c | 662 -
external/lgpl3/mpfr/dist/sinh.c | 182 -
external/lgpl3/mpfr/dist/sinh_cosh.c | 157 -
external/lgpl3/mpfr/dist/speed.c | 283 -
external/lgpl3/mpfr/dist/sqr.c | 107 -
external/lgpl3/mpfr/dist/sqrt.c | 256 -
external/lgpl3/mpfr/dist/sqrt_ui.c | 54 -
external/lgpl3/mpfr/dist/src/Makefile.in | 2 +
external/lgpl3/mpfr/dist/stack_interface.c | 104 -
external/lgpl3/mpfr/dist/strtofr.c | 825 --
external/lgpl3/mpfr/dist/sub.c | 111 -
external/lgpl3/mpfr/dist/sub1.c | 637 -
external/lgpl3/mpfr/dist/sub1sp.c | 809 --
external/lgpl3/mpfr/dist/sub_d.c | 49 -
external/lgpl3/mpfr/dist/sub_ui.c | 54 -
external/lgpl3/mpfr/dist/subnormal.c | 163 -
external/lgpl3/mpfr/dist/sum.c | 315 -
external/lgpl3/mpfr/dist/swap.c | 54 -
external/lgpl3/mpfr/dist/tan.c | 87 -
external/lgpl3/mpfr/dist/tanh.c | 151 -
external/lgpl3/mpfr/dist/tests/tasin.c | 4 +-
external/lgpl3/mpfr/dist/tests/tatan.c | 43 +-
external/lgpl3/mpfr/dist/tests/texp.c | 4 +-
external/lgpl3/mpfr/dist/texinfo.tex | 9291 --------------------------
external/lgpl3/mpfr/dist/tuneup.c | 646 -
external/lgpl3/mpfr/dist/uceil_exp2.c | 65 -
external/lgpl3/mpfr/dist/uceil_log2.c | 63 -
external/lgpl3/mpfr/dist/ufloor_log2.c | 53 -
external/lgpl3/mpfr/dist/ui_div.c | 96 -
external/lgpl3/mpfr/dist/ui_pow.c | 41 -
external/lgpl3/mpfr/dist/ui_pow_ui.c | 95 -
external/lgpl3/mpfr/dist/ui_sub.c | 63 -
external/lgpl3/mpfr/dist/urandom.c | 143 -
external/lgpl3/mpfr/dist/urandomb.c | 99 -
external/lgpl3/mpfr/dist/vasprintf.c | 2205 ------
external/lgpl3/mpfr/dist/version.c | 29 -
external/lgpl3/mpfr/dist/volatile.c | 36 -
external/lgpl3/mpfr/dist/yn.c | 424 -
external/lgpl3/mpfr/dist/zeta.c | 463 -
external/lgpl3/mpfr/dist/zeta_ui.c | 229 -
248 files changed, 348 insertions(+), 62494 deletions(-)
diffs (truncated from 64448 to 300 lines):
diff -r 67d3c29ffc9f -r d53650934fa4 external/lgpl3/mpfr/dist/FAQ.html
--- a/external/lgpl3/mpfr/dist/FAQ.html Thu Nov 28 12:30:54 2013 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,389 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<!--
-Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
-Contributed by the Arenaire and Cacao projects, INRIA.
-
-This file is part of the GNU MPFR Library.
-
-The GNU MPFR Library is free software; you can redistribute it and/or modify
-it under the terms of 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.
-
-The GNU MPFR 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 Lesser General Public
-License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see
-http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
--->
-
-<!--
- Do not modify directly! Regenerate this file with:
- xsltproc -\-nodtdattr faq-web.xsl faq.xhtml
- -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Frequently Asked Questions about GNU MPFR</title>
-<style type="text/css">/*<![CDATA[*/
-/* Global stylesheet for visual media */
-
-html, body
-{
- background: white;
- color: black;
-}
-
-div.logo { float: right }
-div.logo img { border: 0 }
-
-div.footer img { border: 0 }
-
-dt
-{
- margin-top: 2ex;
- margin-bottom: 1ex;
- font-weight: bolder;
-}
-
-/* For testing: dd { background: #ddddff } */
-
-table { margin: 0.5ex auto }
-
-li { margin-top: 0.5ex; margin-bottom: 0.5ex }
-
-dd + dd
-{
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 0.5ex;
- padding-bottom: 0;
-}
-
-li > p, dd > p
-{
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 0.5ex;
- padding-bottom: 0.5ex;
-}
-
-.block-code code, code.block-code,
-.block-code samp, samp.block-code
-{
- display: block;
- padding: 0.5ex 0;
- margin-left: 2em;
-}
-
-.nowrap { white-space: nowrap }
-
-/*
-dl.faq { counter-reset: faq }
-
-dl.faq dt:before
-{
- counter-increment: faq;
- content: counter(faq) ". ";
-}
-*/
-
-dl.faq dt { background: #dddddd }
-
-dl.faq dd
-{
- border-left: 4px solid;
- border-color: transparent;
- margin-left: 0em;
- padding-left: 1.5em;
-}
-
-dl.faq dt:target + dd
-{
- border-left-color: #aaaaaa;
-}
-
-var.env { font-style: normal }
-/*]]>*/</style>
-</head>
-
-<body>
-
-<h1>Frequently Asked Questions about <cite><acronym>GNU</acronym> <acronym>MPFR</acronym></cite></h1>
-
-<p><strong>Important notice: Problems with a particular version of
-<cite><acronym>MPFR</acronym></cite> are discussed in the corresponding
-bugs page.</strong></p>
-
-<p>The latest version of this <acronym>FAQ</acronym> is available at
-<a href="http://www.mpfr.org/faq.html">http://www.mpfr.org/faq.html</a>.
-Please look at this version if possible.</p>
-
-<ol>
-<li><a href="#mpfr_vs_mpf">What are the differences between
-<cite><acronym>MPF</acronym></cite> from <cite><acronym>GMP</acronym></cite>
-and <cite><acronym>MPFR</acronym></cite>?</a></li>
-<li><a href="#mpf2mpfr">How to convert my program written using
-<cite><acronym>MPF</acronym></cite> to
-<cite><acronym>MPFR</acronym></cite>?</a></li>
-<li><a href="#no_libgmp">At configure time, I get the error: <q>libgmp not found or uses a different ABI.</q></a></li>
-<li><a href="#undef_ref1">I get undefined reference to <code>__gmp_get_memory_functions</code>.</a></li>
-<li><a href="#undef_ref2">When I link my program with
-<cite><acronym>MPFR</acronym></cite>, I get undefined reference
-to <code>__gmpXXXX</code>.</a></li>
-<li><a href="#crash_high_prec">My program crashes with high precisions.</a></li>
-<li><a href="#accuracy">Though I have increased the precision, the results
-are not more accurate.</a></li>
-<li><a href="#detect_mpfr">How can I detect <cite><acronym>MPFR</acronym></cite>
-installation using <cite>autoconf</cite> or <cite>pkg-config</cite>?</a></li>
-<li><a href="#cite">How to cite <cite><acronym>MPFR</acronym></cite> in a
-scientific publication?</a></li>
-<li><a href="#fpic">When I build <cite><acronym>MPFR</acronym></cite>, I get
-an error asking me to recompile with <samp>-fPIC</samp>.</a></li>
-</ol>
-
-<dl class="faq">
-
-<dt id="mpfr_vs_mpf">1. What are the differences between
-<cite><acronym>MPF</acronym></cite> from <cite><acronym>GMP</acronym></cite>
-and <cite><acronym>MPFR</acronym></cite>?</dt>
-
-<dd><p>The main differences are:</p>
-<ul>
-<li><p>The precision of a <cite><acronym>MPFR</acronym></cite> variable
-is the <em>exact</em> number of bits used for its mantissa, whereas in
-<cite><acronym>MPF</acronym></cite>, the precision requested by the user
-is a minimum value (<cite><acronym>MPF</acronym></cite> generally uses a
-higher precision). With the additional difference below, this implies that
-the <cite><acronym>MPFR</acronym></cite> results do not depend on the
-number of bits (16, 32, 64 or more) of the underlying architecture.</p></li>
-<li><p>As a consequence, <cite><acronym>MPFR</acronym></cite> uses a
-base-2 exponent, whereas in <cite><acronym>MPF</acronym></cite>, this
-is a base-2<sup>32</sup> or base-2<sup>64</sup> exponent, depending on
-the limb size. For this reason (and other internal ones), the maximum
-exponent range in <cite><acronym>MPFR</acronym></cite> is different
-(and smaller, if the exponent is represented by the same type as in
-<cite><acronym>MPF</acronym></cite>).</p></li>
-<li><p><cite><acronym>MPFR</acronym></cite> provides an additional rounding
-mode argument to its functions; furthermore, it is guaranteed that the
-result of any operation is the nearest possible floating-point value from
-the exact result (considering the input variables as exact values), taking
-into account the precision of the destination variable and the rounding
-mode. <cite><acronym>MPFR</acronym></cite> also says whether the rounded
-result is above or below the exact result.</p></li>
-<li><p><cite><acronym>MPFR</acronym></cite> supports much more functions
-(in particular transcendental functions such as exponentials, logarithms,
-trigonometric functions and so on) and special values: signed zeros,
-infinities, not-a-number (NaN).</p></li>
-</ul></dd>
-
-<dt id="mpf2mpfr">2. How to convert my program written using
-<cite><acronym>MPF</acronym></cite> to
-<cite><acronym>MPFR</acronym></cite>?</dt>
-
-<dd><p>You need to add <q><code>r</code></q> to the function names, and to
-specify the rounding mode (<code>MPFR_RNDN</code> for rounding to nearest,
-<code>MPFR_RNDZ</code> for rounding towards zero, <code>MPFR_RNDU</code>
-for rounding towards plus infinity, <code>MPFR_RNDD</code> for rounding
-towards minus infinity). You can also define macros as follows:
-<code class="block-code">#define mpf_add(a, b, c) mpfr_add(a, b, c, MPFR_RNDN)</code></p>
-<p>The header file <samp>mpf2mpfr.h</samp> from the
-<cite><acronym>MPFR</acronym></cite> distribution automatically
-redefines all <cite><acronym>MPF</acronym></cite> functions in this
-way, using the default <cite><acronym>MPFR</acronym></cite> rounding
-mode. Thus you simply need to add the following line in all your files
-using <cite><acronym>MPF</acronym></cite> functions:
-<code class="block-code">#include <mpf2mpfr.h></code>
-just after the <samp>gmp.h</samp> and <samp>mpfr.h</samp>
-header files. If the program uses <cite><acronym>MPF</acronym></cite>
-internals (such as direct access to <code>__mpf_struct</code> members),
-additional changes will be needed.</p></dd>
-
-<dt id="no_libgmp">3. At configure time, I get the error: <q>libgmp not found or uses a different ABI.</q></dt>
-
-<dd><p>This test (<samp>checking for __gmpz_init in -lgmp</samp>) comes
-after the <samp>gmp.h</samp> detection. The failure occurs either because
-the <cite><acronym>GMP</acronym></cite> library could not be found
-(as it is not in the provided library search paths) or because the
-<cite><acronym>GMP</acronym></cite> library that was found does not have
-the expected <acronym title="Application Binary Interface">ABI</acronym>
-(<abbr>e.g.</abbr> 32-bit <abbr>vs</abbr> 64-bit). The latter problem can
-have several causes:</p>
-<ul>
-<li>A wrong libgmp library has been picked up. This can occur if you have
-several <cite><acronym>GMP</acronym></cite> versions installed on the
-machine and something is wrong with the provided library search paths.</li>
-<li>Wrong compiler options (<samp>CFLAGS</samp>) were given. In general, the
-presence or absence of the <samp>-m64</samp> compiler option must match the
-library <acronym title="Application Binary Interface">ABI</acronym>.</li>
-<li>A wrong <samp>gmp.h</samp> file has been picked up (if you have several
-<cite><acronym>GMP</acronym></cite> versions installed). Indeed, by default,
-<cite><acronym>MPFR</acronym></cite> gets the compiler options from the
-<samp>gmp.h</samp> file (with <cite><acronym>GMP</acronym></cite> 4.2.3
-or later); this is needed because <cite><acronym>GMP</acronym></cite> does
-not necessarily use the default <acronym>ABI</acronym>. The consequence is
-that if the <samp>gmp.h</samp> file is associated with a library using a
-different <acronym>ABI</acronym>, the <acronym>ABI</acronym>-related options
-will be incorrect. Hence the failure.</li>
-</ul>
-<p>Note: The <samp>config.log</samp> output gives more information
-than the error message. In particular, see the output of the test:
-<samp>checking for CC and CFLAGS in gmp.h</samp>; it should give you
-the default compiler options (from <samp>gmp.h</samp>).</p>
-
-<p>See also the answer to the <a href="#undef_ref1">next question</a>.</p></dd>
-
-<dt id="undef_ref1">4. I get undefined reference to <code>__gmp_get_memory_functions</code>.</dt>
-
-<dd><p>Note: this was mainly a problem when upgrading from
-<cite><acronym>GMP</acronym></cite> 4.1.4 to a later version,
-but information given below may still be useful in other cases,
-when several <cite><acronym>GMP</acronym></cite> libraries are
-installed on the same machine.</p>
-
-<p>If you get such an error, in particular when running
-<samp>make check</samp>, then this probably means that you are using
-the header file from <cite><acronym>GMP</acronym></cite> 4.2.x but the
-<cite><acronym>GMP</acronym></cite> 4.1.4 library. This can happen if
-several <cite><acronym>GMP</acronym></cite> versions are installed on
-your machine (<abbr>e.g.</abbr>, one provided by the system in
-<samp>/usr/{include,lib}</samp> and a new one installed by the owner or
-administrator of the machine in <samp>/usr/local/{include,lib}</samp>)
-and your include and library search paths are inconsistent. On various
-<acronym>GNU</acronym>/Linux machines, this is unfortunately the case
-by default (<samp>/usr/local/include</samp> is in the default include
-search path, but <samp>/usr/local/lib</samp> is <em>not</em> in the
-default library search path). Typical errors are:
-<samp class="block-code">undefined reference to `__gmp_get_memory_functions'</samp>
-in <samp>make check</samp>. The best solution is to add
-<samp>/usr/local/include</samp> to your <var class="env">C_INCLUDE_PATH</var>
-environment variable and to add <samp>/usr/local/lib</samp> to your
-<var class="env">LIBRARY_PATH</var> and <var class="env">LD_LIBRARY_PATH</var>
-environment variables (and/or <var class="env">LD_RUN_PATH</var>).
-Alternatively, you can use <samp>--with-gmp*</samp> configure options,
-<abbr>e.g.</abbr> <samp>--with-gmp=/usr/local</samp>, but <strong>this is
-not guaranteed to work</strong> (in particular with <samp>gcc</samp> and
-system directories such as <samp>/usr</samp> or <samp>/usr/local</samp>),
-and other software that uses <cite><acronym>GMP</acronym></cite> and/or
-<cite><acronym>MPFR</acronym></cite> will need correct paths too;
-environment variables allow you to set them in a global way.</p>
-<p>Other information can be given in the <samp>INSTALL</samp> file and
-<samp>ld</samp> manual. Please look at them for more details. See also
-the <a href="#undef_ref2">next question</a>.</p></dd>
-
-<dt id="undef_ref2">5. When I link my program with
-<cite><acronym>MPFR</acronym></cite>, I get undefined reference
-to <code>__gmpXXXX</code>.</dt>
-
-<dd><p>Link your program with <cite><acronym>GMP</acronym></cite>. Assuming
-that your program is <samp>foo.c</samp>, you should link it using:
-<samp class="block-code">cc link.c -lmpfr -lgmp</samp>
-<cite><acronym>MPFR</acronym></cite> library reference (<samp>-lmpfr</samp>)
-should be before <cite><acronym>GMP</acronym></cite>'s one
-(<samp>-lgmp</samp>). Another solution is, with <acronym>GNU</acronym>
-<samp>ld</samp>, to give all the libraries inside a group:
-<samp class="block-code">gcc link.c -Wl,--start-group libgmp.a libmpfr.a -Wl,--end-group</samp>
-See <samp>INSTALL</samp> file and <samp>ld</samp> manual for more
-details.</p>
-<p>If you used correct link options, but still get an error, this may mean
-that your include and library search paths are inconsistent. Please see the
-<a href="#undef_ref1">previous question</a>.</p></dd>
Home |
Main Index |
Thread Index |
Old Index