This file is indexed.

/usr/share/doc/libmpfr-doc/mpfr.html/Changed-Functions.html is in libmpfr-doc 4.0.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual documents how to install and use the Multiple Precision
Floating-Point Reliable Library, version 4.0.1.

Copyright 1991, 1993-2018 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no Invariant Sections,
with no Front-Cover Texts, and with no Back-Cover Texts.  A copy of the
license is included in GNU Free Documentation License. -->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Changed Functions (GNU MPFR 4.0.1)</title>

<meta name="description" content="How to install and use GNU MPFR, a library for reliable multiple precision
floating-point arithmetic, version 4.0.1.">
<meta name="keywords" content="Changed Functions (GNU MPFR 4.0.1)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="API-Compatibility.html#API-Compatibility" rel="up" title="API Compatibility">
<link href="Removed-Functions.html#Removed-Functions" rel="next" title="Removed Functions">
<link href="Added-Functions.html#Added-Functions" rel="prev" title="Added Functions">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Changed-Functions"></a>
<div class="header">
<p>
Next: <a href="Removed-Functions.html#Removed-Functions" accesskey="n" rel="next">Removed Functions</a>, Previous: <a href="Added-Functions.html#Added-Functions" accesskey="p" rel="prev">Added Functions</a>, Up: <a href="API-Compatibility.html#API-Compatibility" accesskey="u" rel="up">API Compatibility</a> &nbsp; [<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Changed-Functions-1"></a>
<h3 class="section">6.3 Changed Functions</h3>

<p>The following functions have changed after MPFR 2.2. Changes can affect
the behavior of code written for some MPFR version when built and run
against another MPFR version (older or newer), as described below.
</p>
<ul>
<li> <code>mpfr_abs</code>, <code>mpfr_neg</code> and <code>mpfr_set</code> changed in MPFR 4.0.
In previous MPFR versions, the sign bit of a NaN was unspecified; however,
in practice, it was set as now specified except for <code>mpfr_neg</code> with
a reused argument: <code>mpfr_neg(x,x,rnd)</code>.

</li><li> <code>mpfr_check_range</code> changed in MPFR 2.3.2 and MPFR 2.4.
If the value is an inexact infinity, the overflow flag is now set
(in case it was lost), while it was previously left unchanged.
This is really what is expected in practice (and what the MPFR code
was expecting), so that the previous behavior was regarded as a bug.
Hence the change in MPFR 2.3.2.

</li><li> <code>mpfr_eint</code> changed in MPFR 4.0.
This function now returns the value of the E1/eint1 function for
negative argument (before MPFR 4.0, it was returning NaN).

</li><li> <code>mpfr_get_f</code> changed in MPFR 3.0.
This function was returning zero, except for NaN and Inf, which do not
exist in MPF. The <em>erange</em> flag is now set in these cases,
and <code>mpfr_get_f</code> now returns the usual ternary value.

</li><li> <code>mpfr_get_si</code>, <code>mpfr_get_sj</code>, <code>mpfr_get_ui</code>
and <code>mpfr_get_uj</code> changed in MPFR 3.0.
In previous MPFR versions, the cases where the <em>erange</em> flag
is set were unspecified.

</li><li> <code>mpfr_get_str</code> changed in MPFR 4.0.
This function now sets the NaN flag on NaN input (to follow the usual MPFR
rules on NaN and IEEE 754-2008 recommendations on string conversions from
Subclause 5.12.1) and sets the inexact flag when the conversion is inexact.

</li><li> <code>mpfr_get_z</code> changed in MPFR 3.0.
The return type was <code>void</code>; it is now <code>int</code>, and the usual
ternary value is returned.  Thus programs that need to work with both
MPFR 2.x and 3.x must not use the return value.  Even in this case,
C code using <code>mpfr_get_z</code> as the second or third term of
a conditional operator may also be affected. For instance, the
following is correct with MPFR 3.0, but not with MPFR 2.x:
<div class="example">
<pre class="example">  bool ? mpfr_get_z(...) : mpfr_add(...);
</pre></div>
<p>On the other hand, the following is correct with MPFR 2.x, but not
with MPFR 3.0:
</p><div class="example">
<pre class="example">  bool ? mpfr_get_z(...) : (void) mpfr_add(...);
</pre></div>
<p>Portable code should cast <code>mpfr_get_z(...)</code> to <code>void</code> to
use the type <code>void</code> for both terms of the conditional operator,
as in:
</p><div class="example">
<pre class="example">  bool ? (void) mpfr_get_z(...) : (void) mpfr_add(...);
</pre></div>
<p>Alternatively, <code>if ... else</code> can be used instead of the
conditional operator.
</p>
<p>Moreover the cases where the <em>erange</em> flag is set were unspecified
in MPFR 2.x.
</p>
</li><li> <code>mpfr_get_z_exp</code> changed in MPFR 3.0.
In previous MPFR versions, the cases where the <em>erange</em> flag
is set were unspecified.
Note: this function has been renamed to <code>mpfr_get_z_2exp</code>
in MPFR 3.0, but <code>mpfr_get_z_exp</code> is still available for
compatibility reasons.

</li><li> <code>mpfr_set_exp</code> changed in MPFR 4.0.
Before MPFR 4.0, the exponent was set whatever the contents of the MPFR
object in argument. In practice, this could be useful as a low-level
function when the MPFR number was being constructed by setting the fields
of its internal structure, but the API does not provide a way to do this
except by using internals. Thus, for the API, this behavior was useless
and could quickly lead to undefined behavior due to the fact that the
generated value could have an invalid format if the MPFR object contained
a special value (NaN, infinity or zero).

</li><li> <code>mpfr_strtofr</code> changed in MPFR 2.3.1 and MPFR 2.4.
This was actually a bug fix since the code and the documentation did
not match.  But both were changed in order to have a more consistent
and useful behavior.  The main changes in the code are as follows.
The binary exponent is now accepted even without the <code>0b</code> or
<code>0x</code> prefix.  Data corresponding to NaN can now have an optional
sign (such data were previously invalid).

</li><li> <code>mpfr_strtofr</code> changed in MPFR 3.0.
This function now accepts bases from 37 to 62 (no changes for the other
bases).  Note: if an unsupported base is provided to this function,
the behavior is undefined; more precisely, in MPFR 2.3.1 and later,
providing an unsupported base yields an assertion failure (this
behavior may change in the future).

</li><li> <code>mpfr_subnormalize</code> changed in MPFR 3.1.
This was actually regarded as a bug fix. The <code>mpfr_subnormalize</code>
implementation up to MPFR 3.0.0 did not change the flags. In particular,
it did not follow the generic rule concerning the inexact flag (and no
special behavior was specified). The case of the underflow flag was more
a lack of specification.

</li><li> <code>mpfr_sum</code> changed in MPFR 4.0.
The <code>mpfr_sum</code> function has completely been rewritten for MPFR 4.0,
with an update of the specification: the sign of an exact zero result
is now specified, and the return value is now the usual ternary value.
The old <code>mpfr_sum</code> implementation could also take all the memory
and crash on inputs of very different magnitude.

</li><li> <code>mpfr_urandom</code> and <code>mpfr_urandomb</code> changed in MPFR 3.1.
Their behavior no longer depends on the platform (assuming this is also true
for GMP&rsquo;s random generator, which is not the case between GMP 4.1 and 4.2 if
<code>gmp_randinit_default</code> is used).  As a consequence, the returned values
can be different between MPFR 3.1 and previous MPFR versions.
Note: as the reproducibility of these functions was not specified
before MPFR 3.1, the MPFR 3.1 behavior is <em>not</em> regarded as
backward incompatible with previous versions.

</li><li> <code>mpfr_urandom</code> changed in MPFR 4.0.
The next random state no longer depends on the current exponent range and
the rounding mode. The exceptions due to the rounding of the random number
are now correctly generated, following the uniform distribution.
As a consequence, the returned values can be different between MPFR 4.0
and previous MPFR versions.

</li></ul>

<hr>
<div class="header">
<p>
Next: <a href="Removed-Functions.html#Removed-Functions" accesskey="n" rel="next">Removed Functions</a>, Previous: <a href="Added-Functions.html#Added-Functions" accesskey="p" rel="prev">Added Functions</a>, Up: <a href="API-Compatibility.html#API-Compatibility" accesskey="u" rel="up">API Compatibility</a> &nbsp; [<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>