w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

mpfr.h
Go to the documentation of this file.
1 /* mpfr.h -- Include file for mpfr.
2 
3 Copyright 1999-2020 Free Software Foundation, Inc.
4 Contributed by the AriC and Caramba projects, INRIA.
5 
6 This file is part of the GNU MPFR Library.
7 
8 The GNU MPFR Library is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 The GNU MPFR Library is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public License
19 along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see
20 https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
21 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
22 
23 #ifndef __MPFR_H
24 #define __MPFR_H
25 
26 /* Define MPFR version number */
27 #define MPFR_VERSION_MAJOR 4
28 #define MPFR_VERSION_MINOR 1
29 #define MPFR_VERSION_PATCHLEVEL 0
30 #define MPFR_VERSION_STRING "4.1.0"
31 
32 /* User macros:
33  MPFR_USE_FILE: Define it to make MPFR define functions dealing
34  with FILE* (auto-detect).
35  MPFR_USE_INTMAX_T: Define it to make MPFR define functions dealing
36  with intmax_t (auto-detect).
37  MPFR_USE_VA_LIST: Define it to make MPFR define functions dealing
38  with va_list (auto-detect).
39  MPFR_USE_C99_FEATURE: Define it to 1 to make MPFR support C99-feature
40  (auto-detect), to 0 to bypass the detection.
41  MPFR_USE_EXTENSION: Define it to make MPFR use GCC extension to
42  reduce warnings.
43  MPFR_USE_NO_MACRO: Define it to make MPFR remove any overriding
44  function macro.
45 */
46 
47 /* Macros dealing with MPFR VERSION */
48 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
49 #define MPFR_VERSION \
50 MPFR_VERSION_NUM(MPFR_VERSION_MAJOR,MPFR_VERSION_MINOR,MPFR_VERSION_PATCHLEVEL)
51 
52 #ifndef MPFR_USE_MINI_GMP
53 #include <gmp.h>
54 #else
55 #include <mini-gmp.h>
56 #endif
57 
58 /* Avoid some problems with macro expansion if the user defines macros
59  with the same name as keywords. By convention, identifiers and macro
60  names starting with mpfr_ are reserved by MPFR. */
61 typedef void mpfr_void;
62 typedef int mpfr_int;
63 typedef unsigned int mpfr_uint;
64 typedef long mpfr_long;
65 typedef unsigned long mpfr_ulong;
66 typedef size_t mpfr_size_t;
67 
68 /* Global (possibly TLS) flags. Might also be used in an mpfr_t in the
69  future (there would be room as mpfr_sign_t just needs 1 byte).
70  TODO: The tests currently assume that the flags fits in an unsigned int;
71  this should be cleaned up, e.g. by defining a function that outputs the
72  flags as a string or by using the flags_out function (from tests/tests.c
73  directly). */
74 typedef unsigned int mpfr_flags_t;
75 
76 /* Flags macros (in the public API) */
77 #define MPFR_FLAGS_UNDERFLOW 1
78 #define MPFR_FLAGS_OVERFLOW 2
79 #define MPFR_FLAGS_NAN 4
80 #define MPFR_FLAGS_INEXACT 8
81 #define MPFR_FLAGS_ERANGE 16
82 #define MPFR_FLAGS_DIVBY0 32
83 #define MPFR_FLAGS_ALL (MPFR_FLAGS_UNDERFLOW | \
84  MPFR_FLAGS_OVERFLOW | \
85  MPFR_FLAGS_NAN | \
86  MPFR_FLAGS_INEXACT | \
87  MPFR_FLAGS_ERANGE | \
88  MPFR_FLAGS_DIVBY0)
89 
90 /* Definition of rounding modes (DON'T USE MPFR_RNDNA!).
91  Warning! Changing the contents of this enum should be seen as an
92  interface change since the old and the new types are not compatible
93  (the integer type compatible with the enumerated type can even change,
94  see ISO C99, 6.7.2.2#4), and in Makefile.am, AGE should be set to 0.
95 
96  MPFR_RNDU must appear just before MPFR_RNDD (see
97  MPFR_IS_RNDUTEST_OR_RNDDNOTTEST in mpfr-impl.h).
98 
99  If you change the order of the rounding modes, please update the routines
100  in texceptions.c which assume 0=RNDN, 1=RNDZ, 2=RNDU, 3=RNDD, 4=RNDA.
101 */
102 typedef enum {
103  MPFR_RNDN=0, /* round to nearest, with ties to even */
104  MPFR_RNDZ, /* round toward zero */
105  MPFR_RNDU, /* round toward +Inf */
106  MPFR_RNDD, /* round toward -Inf */
107  MPFR_RNDA, /* round away from zero */
108  MPFR_RNDF, /* faithful rounding */
109  MPFR_RNDNA=-1 /* round to nearest, with ties away from zero (mpfr_round) */
111 
112 /* kept for compatibility with MPFR 2.4.x and before */
113 #define GMP_RNDN MPFR_RNDN
114 #define GMP_RNDZ MPFR_RNDZ
115 #define GMP_RNDU MPFR_RNDU
116 #define GMP_RNDD MPFR_RNDD
117 
118 /* The _MPFR_PREC_FORMAT and _MPFR_EXP_FORMAT values are automatically
119  defined below. You MUST NOT force a value (this will break the ABI),
120  possibly except for a very particular use, in which case you also need
121  to rebuild the MPFR library with the chosen values; do not install this
122  rebuilt library in a path that is searched by default, otherwise this
123  will break applications that are dynamically linked with MPFR.
124 
125  Using non-default values is not guaranteed to work.
126 
127  Note: With the following default choices for _MPFR_PREC_FORMAT and
128  _MPFR_EXP_FORMAT, mpfr_exp_t will be the same as [mp_exp_t] (at least
129  up to GMP 6). */
130 
131 /* Define precision: 1 (short), 2 (int) or 3 (long).
132  DON'T FORCE A VALUE (see above). */
133 #ifndef _MPFR_PREC_FORMAT
134 # if __GMP_MP_SIZE_T_INT
135 # define _MPFR_PREC_FORMAT 2
136 # else
137 # define _MPFR_PREC_FORMAT 3
138 # endif
139 #endif
140 
141 /* Define exponent: 1 (short), 2 (int), 3 (long) or 4 (intmax_t).
142  DON'T FORCE A VALUE (see above). */
143 #ifndef _MPFR_EXP_FORMAT
144 # define _MPFR_EXP_FORMAT _MPFR_PREC_FORMAT
145 #endif
146 
147 #if _MPFR_PREC_FORMAT > _MPFR_EXP_FORMAT
148 # error "mpfr_prec_t must not be larger than mpfr_exp_t"
149 #endif
150 
151 /* Let's make mpfr_prec_t signed in order to avoid problems due to the
152  usual arithmetic conversions when mixing mpfr_prec_t and mpfr_exp_t
153  in an expression (for error analysis) if casts are forgotten.
154  Note: mpfr_prec_t is currently limited to "long". This means that
155  under MS Windows, the precisions are limited to about 2^31; however,
156  these are already huge precisions, probably sufficient in practice
157  on this platform. */
158 #if _MPFR_PREC_FORMAT == 1
159 typedef short mpfr_prec_t;
160 typedef unsigned short mpfr_uprec_t;
161 #elif _MPFR_PREC_FORMAT == 2
162 typedef int mpfr_prec_t;
163 typedef unsigned int mpfr_uprec_t;
164 #elif _MPFR_PREC_FORMAT == 3
165 /* we could use "long long" under Windows 64 here, which can be tested
166  with the macro _WIN64 according to
167  https://sourceforge.net/p/predef/wiki/OperatingSystems/ */
168 typedef long mpfr_prec_t;
169 typedef unsigned long mpfr_uprec_t;
170 #else
171 # error "Invalid MPFR Prec format"
172 #endif
173 
174 /* Definition of precision limits without needing <limits.h> */
175 /* Note: The casts allows the expression to yield the wanted behavior
176  for _MPFR_PREC_FORMAT == 1 (due to integer promotion rules). We
177  also make sure that MPFR_PREC_MIN and MPFR_PREC_MAX have a signed
178  integer type. The "- 256" allows more security, avoiding some
179  integer overflows in extreme cases; ideally it should be useless. */
180 #define MPFR_PREC_MIN 1
181 #define MPFR_PREC_MAX ((mpfr_prec_t) ((((mpfr_uprec_t) -1) >> 1) - 256))
182 
183 /* Definition of sign */
184 typedef int mpfr_sign_t;
185 
186 /* Definition of the exponent. _MPFR_EXP_FORMAT must be large enough
187  so that mpfr_exp_t has at least 32 bits. */
188 #if _MPFR_EXP_FORMAT == 1
189 typedef short mpfr_exp_t;
190 typedef unsigned short mpfr_uexp_t;
191 #elif _MPFR_EXP_FORMAT == 2
192 typedef int mpfr_exp_t;
193 typedef unsigned int mpfr_uexp_t;
194 #elif _MPFR_EXP_FORMAT == 3
195 typedef long mpfr_exp_t;
196 typedef unsigned long mpfr_uexp_t;
197 #elif _MPFR_EXP_FORMAT == 4
198 /* Note: in this case, intmax_t and uintmax_t must be defined before
199  the inclusion of mpfr.h (we do not include <stdint.h> here because
200  of some non-ISO C99 implementations that support these types). */
201 typedef intmax_t mpfr_exp_t;
202 typedef uintmax_t mpfr_uexp_t;
203 #else
204 # error "Invalid MPFR Exp format"
205 #endif
206 
207 /* Definition of the standard exponent limits */
208 #define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((mpfr_ulong) 1 << 30) - 1))
209 #define MPFR_EMIN_DEFAULT (-(MPFR_EMAX_DEFAULT))
210 
211 /* DON'T USE THIS! (For MPFR-public macros only, see below.)
212  The mpfr_sgn macro uses the fact that __MPFR_EXP_NAN and __MPFR_EXP_ZERO
213  are the smallest values. For a n-bit type, EXP_MAX is 2^(n-1)-1,
214  EXP_ZERO is 1-2^(n-1), EXP_NAN is 2-2^(n-1), EXP_INF is 3-2^(n-1).
215  This may change in the future. MPFR code should not be based on these
216  representations (but if this is absolutely needed, protect the code
217  with a static assertion). */
218 #define __MPFR_EXP_MAX ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))
219 #define __MPFR_EXP_NAN (1 - __MPFR_EXP_MAX)
220 #define __MPFR_EXP_ZERO (0 - __MPFR_EXP_MAX)
221 #define __MPFR_EXP_INF (2 - __MPFR_EXP_MAX)
222 
223 /* Definition of the main structure */
224 typedef struct {
229 } __mpfr_struct;
230 
231 /* Compatibility with previous types of MPFR */
232 #ifndef mp_rnd_t
233 # define mp_rnd_t mpfr_rnd_t
234 #endif
235 #ifndef mp_prec_t
236 # define mp_prec_t mpfr_prec_t
237 #endif
238 
239 /*
240  The represented number is
241  _sign*(_d[k-1]/B+_d[k-2]/B^2+...+_d[0]/B^k)*2^_exp
242  where k=ceil(_mp_prec/GMP_NUMB_BITS) and B=2^GMP_NUMB_BITS.
243 
244  For the msb (most significant bit) normalized representation, we must have
245  _d[k-1]>=B/2, unless the number is singular.
246 
247  We must also have the last k*GMP_NUMB_BITS-_prec bits set to zero.
248 */
249 
252 typedef const __mpfr_struct *mpfr_srcptr;
253 
254 /* For those who need a direct and fast access to the sign field.
255  However it is not in the API, thus use it at your own risk: it might
256  not be supported, or change name, in further versions!
257  Unfortunately, it must be defined here (instead of MPFR's internal
258  header file mpfr-impl.h) because it is used by some macros below.
259 */
260 #define MPFR_SIGN(x) ((x)->_mpfr_sign)
261 
262 /* Stack interface */
263 typedef enum {
269 
270 /* Free cache policy */
271 typedef enum {
272  MPFR_FREE_LOCAL_CACHE = 1, /* 1 << 0 */
273  MPFR_FREE_GLOBAL_CACHE = 2 /* 1 << 1 */
275 
276 /* GMP defines:
277  + size_t: Standard size_t
278  + __GMP_NOTHROW For C++: can't throw .
279  + __GMP_EXTERN_INLINE Attribute for inline function.
280  + __GMP_DECLSPEC_EXPORT compiling to go into a DLL
281  + __GMP_DECLSPEC_IMPORT compiling to go into a application
282 */
283 /* Extra MPFR defines */
284 #define __MPFR_SENTINEL_ATTR
285 #if defined (__GNUC__)
286 # if __GNUC__ >= 4
287 # undef __MPFR_SENTINEL_ATTR
288 # define __MPFR_SENTINEL_ATTR __attribute__ ((__sentinel__))
289 # endif
290 #endif
291 
292 /* If the user hasn't requested his/her preference
293  and if the intention of support by the compiler is C99
294  and if the compiler is known to support the C99 feature
295  then we can auto-detect the C99 support as OK.
296  __GNUC__ is used to detect GNU-C, ICC & CLANG compilers.
297  Currently we need only variadic macros, and they are present
298  since GCC >= 3. We don't test library version since we don't
299  use any feature present in the library too (except intmax_t,
300  but they use another detection).*/
301 #ifndef MPFR_USE_C99_FEATURE
302 # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
303 # if defined (__GNUC__)
304 # if __GNUC__ >= 3
305 # define MPFR_USE_C99_FEATURE 1
306 # endif
307 # endif
308 # endif
309 # ifndef MPFR_USE_C99_FEATURE
310 # define MPFR_USE_C99_FEATURE 0
311 # endif
312 #endif
313 
314 /* Support for WINDOWS Dll:
315  Check if we are inside a MPFR build, and if so export the functions.
316  Otherwise does the same thing as GMP */
317 #if defined(__MPFR_WITHIN_MPFR) && __GMP_LIBGMP_DLL
318 # define __MPFR_DECLSPEC __GMP_DECLSPEC_EXPORT
319 #else
320 # ifndef __GMP_DECLSPEC
321 # define __GMP_DECLSPEC
322 # endif
323 # define __MPFR_DECLSPEC __GMP_DECLSPEC
324 #endif
325 
326 /* Use MPFR_DEPRECATED to mark MPFR functions, types or variables as
327  deprecated. Code inspired by Apache Subversion's svn_types.h file.
328  For compatibility with MSVC, MPFR_DEPRECATED must be put before
329  __MPFR_DECLSPEC (not at the end of the function declaration as
330  documented in the GCC manual); GCC does not seem to care.
331  Moreover, in order to avoid a warning when testing such functions,
332  do something like:
333  +------------------------------------------
334  |#ifndef _MPFR_NO_DEPRECATED_funcname
335  |MPFR_DEPRECATED
336  |#endif
337  |__MPFR_DECLSPEC int mpfr_funcname (...);
338  +------------------------------------------
339  and in the corresponding test program:
340  +------------------------------------------
341  |#define _MPFR_NO_DEPRECATED_funcname
342  |#include "mpfr-test.h"
343  +------------------------------------------
344 */
345 #if defined(__GNUC__) && \
346  (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
347 # define MPFR_DEPRECATED __attribute__ ((__deprecated__))
348 #elif defined(_MSC_VER) && _MSC_VER >= 1300
349 # define MPFR_DEPRECATED __declspec(deprecated)
350 #else
351 # define MPFR_DEPRECATED
352 #endif
353 /* TODO: Also define MPFR_EXPERIMENTAL for experimental functions?
354  See SVN_EXPERIMENTAL in Subversion 1.9+ as an example:
355  __attribute__((__warning__("..."))) can be used with GCC 4.3.1+ but
356  not __llvm__, and __declspec(deprecated("...")) can be used with
357  MSC as above. */
358 
359 #if defined(__GNUC__) && \
360  (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
361 # define MPFR_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
362 #else
363 # define MPFR_RETURNS_NONNULL
364 #endif
365 
366 /* Note: In order to be declared, some functions need a specific
367  system header to be included *before* "mpfr.h". If the user
368  forgets to include the header, the MPFR function prototype in
369  the user object file is not correct. To avoid wrong results,
370  we raise a linker error in that case by changing their internal
371  name in the library (prefixed by __gmpfr instead of mpfr). See
372  the lines of the form "#define mpfr_xxx __gmpfr_xxx" below. */
373 
374 #if defined (__cplusplus)
375 extern "C" {
376 #endif
377 
380 
388 
397 
401 
409 
412 __MPFR_DECLSPEC void mpfr_set_divby0 (void);
416 
419 __MPFR_DECLSPEC int mpfr_divby0_p (void);
423 
429  mpfr_flags_t);
430 
432 
436 
437 __MPFR_DECLSPEC void
439 __MPFR_DECLSPEC void
441 __MPFR_DECLSPEC void
443 
448 
456 
459 #ifdef MPFR_WANT_DECIMAL_FLOATS
460 /* _Decimal64 is not defined in C++,
461  cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51364 */
462 __MPFR_DECLSPEC int mpfr_set_decimal64 (mpfr_ptr, _Decimal64, mpfr_rnd_t);
463 __MPFR_DECLSPEC int mpfr_set_decimal128 (mpfr_ptr, _Decimal128, mpfr_rnd_t);
464 #endif
465 __MPFR_DECLSPEC int mpfr_set_ld (mpfr_ptr, long double, mpfr_rnd_t);
466 #ifdef MPFR_WANT_FLOAT128
467 __MPFR_DECLSPEC int mpfr_set_float128 (mpfr_ptr, _Float128, mpfr_rnd_t);
468 __MPFR_DECLSPEC _Float128 mpfr_get_float128 (mpfr_srcptr, mpfr_rnd_t);
469 #endif
472  mpfr_rnd_t);
476 
477 #ifndef MPFR_USE_MINI_GMP
478  /* mini-gmp does not provide mpf_t, we disable the following functions */
482 #endif
484 __MPFR_DECLSPEC int mpfr_set_ui (mpfr_ptr, unsigned long, mpfr_rnd_t);
487  mpfr_rnd_t);
488 #ifndef MPFR_USE_MINI_GMP
489  /* mini-gmp does not provide mpq_t, we disable the following functions */
497 #endif
499 __MPFR_DECLSPEC int mpfr_init_set_str (mpfr_ptr, const char *, int,
500  mpfr_rnd_t);
508  mpfr_rnd_t);
509 
513 #ifdef MPFR_WANT_DECIMAL_FLOATS
514 __MPFR_DECLSPEC _Decimal64 mpfr_get_decimal64 (mpfr_srcptr, mpfr_rnd_t);
515 __MPFR_DECLSPEC _Decimal128 mpfr_get_decimal128 (mpfr_srcptr, mpfr_rnd_t);
516 #endif
525 __MPFR_DECLSPEC char * mpfr_get_str (char*, mpfr_exp_t*, int, size_t,
528 
529 __MPFR_DECLSPEC void mpfr_free_str (char *);
530 
532 #ifndef _MPFR_NO_DEPRECATED_GRANDOM /* for the test of this function */
534 #endif
536  mpfr_rnd_t);
540 
544 
545 #ifndef MPFR_USE_MINI_GMP
546 __MPFR_DECLSPEC int mpfr_printf (const char*, ...);
547 __MPFR_DECLSPEC int mpfr_asprintf (char**, const char*, ...);
548 __MPFR_DECLSPEC int mpfr_sprintf (char*, const char*, ...);
549 __MPFR_DECLSPEC int mpfr_snprintf (char*, size_t, const char*, ...);
550 #endif
551 
555  mpfr_rnd_t);
556 __MPFR_DECLSPEC int mpfr_ui_pow_ui (mpfr_ptr, unsigned long, unsigned long,
557  mpfr_rnd_t);
559  mpfr_rnd_t);
561 
563 __MPFR_DECLSPEC int mpfr_sqrt_ui (mpfr_ptr, unsigned long, mpfr_rnd_t);
565 
570 
572  mpfr_rnd_t);
574  mpfr_rnd_t);
576  mpfr_rnd_t);
578  mpfr_rnd_t);
580  mpfr_rnd_t);
582  mpfr_rnd_t);
583 
590 
597 
599 
604 
606 
611 __MPFR_DECLSPEC int mpfr_log_ui (mpfr_ptr, unsigned long, mpfr_rnd_t);
612 
619 
623 __MPFR_DECLSPEC int mpfr_cmp_ld (mpfr_srcptr, long double);
629 __MPFR_DECLSPEC int mpfr_cmpabs_ui (mpfr_srcptr, unsigned long);
631  mpfr_rnd_t);
634 
636  mpfr_rnd_t);
638  mpfr_rnd_t);
640  mpfr_rnd_t);
641 __MPFR_DECLSPEC int mpfr_div_2ui (mpfr_ptr, mpfr_srcptr, unsigned long,
642  mpfr_rnd_t);
645 
660  mpfr_rnd_t);
662  mpfr_rnd_t);
665  mpfr_rnd_t);
666 
675 
676 __MPFR_DECLSPEC void mpfr_extract (mpz_ptr, mpfr_srcptr, unsigned int);
679 
686 
694 
702  mpfr_rnd_t);
703 
707 
719 
724 #ifndef _MPFR_NO_DEPRECATED_ROOT /* for the test of this function */
726 #endif
727 __MPFR_DECLSPEC int mpfr_root (mpfr_ptr, mpfr_srcptr, unsigned long,
728  mpfr_rnd_t);
730  mpfr_rnd_t);
733  mpfr_rnd_t);
739 __MPFR_DECLSPEC int mpfr_zeta_ui (mpfr_ptr, unsigned long, mpfr_rnd_t);
747 
749 
753 
760 
762  mpfr_rnd_t);
764  mpfr_rnd_t);
769 __MPFR_DECLSPEC int mpfr_sum (mpfr_ptr, const mpfr_ptr *, unsigned long,
770  mpfr_rnd_t);
771 __MPFR_DECLSPEC int mpfr_dot (mpfr_ptr, const mpfr_ptr *, const mpfr_ptr *,
772  unsigned long, mpfr_rnd_t);
773 
774 __MPFR_DECLSPEC void mpfr_free_cache (void);
776 __MPFR_DECLSPEC void mpfr_free_pool (void);
778 
780 
781 __MPFR_DECLSPEC int mpfr_strtofr (mpfr_ptr, const char *, char **, int,
782  mpfr_rnd_t);
783 
786 
794  mpfr_prec_t, void *);
796 
798 
799 #if defined (__cplusplus)
800 }
801 #endif
802 
803 /* Define MPFR_USE_EXTENSION to avoid "gcc -pedantic" warnings. */
804 #ifndef MPFR_EXTENSION
805 # if defined(MPFR_USE_EXTENSION)
806 # define MPFR_EXTENSION __extension__
807 # else
808 # define MPFR_EXTENSION
809 # endif
810 #endif
811 
812 /* Warning! This macro doesn't work with K&R C (e.g., compare the "gcc -E"
813  output with and without -traditional) and shouldn't be used internally.
814  For public use only, but see the MPFR manual. */
815 #define MPFR_DECL_INIT(_x, _p) \
816  MPFR_EXTENSION mp_limb_t __gmpfr_local_tab_##_x[((_p)-1)/GMP_NUMB_BITS+1]; \
817  MPFR_EXTENSION mpfr_t _x = {{(_p),1,__MPFR_EXP_NAN,__gmpfr_local_tab_##_x}}
818 
819 #if MPFR_USE_C99_FEATURE
820 /* C99 & C11 version: functions with multiple inputs supported */
821 #define mpfr_round_nearest_away(func, rop, ...) \
822  (mpfr_round_nearest_away_begin(rop), \
823  mpfr_round_nearest_away_end((rop), func((rop), __VA_ARGS__, MPFR_RNDN)))
824 #else
825 /* C89 version: function with one input supported */
826 #define mpfr_round_nearest_away(func, rop, op) \
827  (mpfr_round_nearest_away_begin(rop), \
828  mpfr_round_nearest_away_end((rop), func((rop), (op), MPFR_RNDN)))
829 #endif
830 
831 /* Fast access macros to replace function interface.
832  If the USER don't want to use the macro interface, let him make happy
833  even if it produces faster and smaller code. */
834 #ifndef MPFR_USE_NO_MACRO
835 
836 /* Inlining these functions is both faster and smaller */
837 #define mpfr_nan_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_NAN)
838 #define mpfr_inf_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_INF)
839 #define mpfr_zero_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_ZERO)
840 #define mpfr_regular_p(_x) ((_x)->_mpfr_exp > __MPFR_EXP_INF)
841 #define mpfr_sgn(_x) \
842  ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \
843  (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (mpfr_void) 0), 0 : \
844  MPFR_SIGN (_x))
845 
846 /* Prevent them from using as lvalues */
847 #define MPFR_VALUE_OF(x) (0 ? (x) : (x))
848 #define mpfr_get_prec(_x) MPFR_VALUE_OF((_x)->_mpfr_prec)
849 #define mpfr_get_exp(_x) MPFR_VALUE_OF((_x)->_mpfr_exp)
850 /* Note 1: If need be, the MPFR_VALUE_OF can be used for other expressions
851  (of any type). Thanks to Wojtek Lerch and Tim Rentsch for the idea.
852  Note 2: Defining mpfr_get_exp() as a macro has the effect to disable
853  the check that the argument is a pure FP number (done in the function);
854  this increases the risk of undetected error and makes debugging more
855  complex. Is it really worth in practice? (Potential FIXME) */
856 
857 #define mpfr_round(a,b) mpfr_rint((a), (b), MPFR_RNDNA)
858 #define mpfr_trunc(a,b) mpfr_rint((a), (b), MPFR_RNDZ)
859 #define mpfr_ceil(a,b) mpfr_rint((a), (b), MPFR_RNDU)
860 #define mpfr_floor(a,b) mpfr_rint((a), (b), MPFR_RNDD)
861 
862 #define mpfr_cmp_ui(b,i) mpfr_cmp_ui_2exp((b),(i),0)
863 #define mpfr_cmp_si(b,i) mpfr_cmp_si_2exp((b),(i),0)
864 #define mpfr_set(a,b,r) mpfr_set4(a,b,r,MPFR_SIGN(b))
865 #define mpfr_abs(a,b,r) mpfr_set4(a,b,r,1)
866 #define mpfr_copysign(a,b,c,r) mpfr_set4(a,b,r,MPFR_SIGN(c))
867 #define mpfr_setsign(a,b,s,r) mpfr_set4(a,b,r,(s) ? -1 : 1)
868 #define mpfr_signbit(x) (MPFR_SIGN(x) < 0)
869 #define mpfr_cmp(b, c) mpfr_cmp3(b, c, 1)
870 #define mpfr_mul_2exp(y,x,n,r) mpfr_mul_2ui((y),(x),(n),(r))
871 #define mpfr_div_2exp(y,x,n,r) mpfr_div_2ui((y),(x),(n),(r))
872 
873 
874 /* When using GCC or ICC, optimize certain common comparisons and affectations.
875  Added casts to improve robustness in case of undefined behavior and
876  compiler extensions based on UB (in particular -fwrapv). MPFR doesn't
877  use such extensions, but these macros will be used by 3rd-party code,
878  where such extensions may be required.
879  Moreover casts to unsigned long have been added to avoid warnings in
880  programs that use MPFR and are compiled with -Wconversion; such casts
881  are OK since if X is a constant expression, then (unsigned long) X is
882  also a constant expression, so that the optimizations still work. The
883  warnings are probably related to the following two bugs:
884  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210
885  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38470 (possibly a variant)
886  and the casts could be removed once these bugs are fixed.
887  Casts shouldn't be used on the generic calls (to the ..._2exp functions),
888  where implicit conversions are performed. Indeed, having at least one
889  implicit conversion in the macro allows the compiler to emit diagnostics
890  when normally expected, for instance in the following call:
891  mpfr_set_ui (x, "foo", MPFR_RNDN);
892  If this is not possible (for future macros), one of the tricks described
893  on http://groups.google.com/group/comp.std.c/msg/e92abd24bf9eaf7b could
894  be used. */
895 #if defined (__GNUC__) && !defined(__cplusplus)
896 #if (__GNUC__ >= 2)
897 
898 #undef mpfr_cmp_ui
899 /* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0.
900  But warning! mpfr_sgn is specified as a macro in the API, thus the macro
901  mustn't be used if side effects are possible, like here. */
902 #define mpfr_cmp_ui(_f,_u) \
903  (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \
904  (mpfr_sgn) (_f) : \
905  mpfr_cmp_ui_2exp ((_f), (_u), 0))
906 
907 #undef mpfr_cmp_si
908 #define mpfr_cmp_si(_f,_s) \
909  (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \
910  mpfr_cmp_ui ((_f), (mpfr_ulong) (mpfr_long) (_s)) : \
911  mpfr_cmp_si_2exp ((_f), (_s), 0))
912 
913 #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95
914 #undef mpfr_set_ui
915 #define mpfr_set_ui(_f,_u,_r) \
916  (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \
917  __extension__ ({ \
918  mpfr_ptr _p = (_f); \
919  _p->_mpfr_sign = 1; \
920  _p->_mpfr_exp = __MPFR_EXP_ZERO; \
921  (mpfr_void) (_r); 0; }) : \
922  mpfr_set_ui_2exp ((_f), (_u), 0, (_r)))
923 #endif
924 
925 #undef mpfr_set_si
926 #define mpfr_set_si(_f,_s,_r) \
927  (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \
928  mpfr_set_ui ((_f), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \
929  mpfr_set_si_2exp ((_f), (_s), 0, (_r)))
930 
931 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
932 /* If the source is a constant number that is a power of 2,
933  optimize the call */
934 #undef mpfr_mul_ui
935 #define mpfr_mul_ui(_f, _g, _u,_r) \
936  (__builtin_constant_p (_u) && (mpfr_ulong) (_u) >= 1 && \
937  ((mpfr_ulong) (_u) & ((mpfr_ulong) (_u) - 1)) == 0 ? \
938  mpfr_mul_2si((_f), (_g), __builtin_ctzl (_u), (_r)) : \
939  mpfr_mul_ui ((_f), (_g), (_u), (_r)))
940 #undef mpfr_div_ui
941 #define mpfr_div_ui(_f, _g, _u,_r) \
942  (__builtin_constant_p (_u) && (mpfr_ulong) (_u) >= 1 && \
943  ((mpfr_ulong) (_u) & ((mpfr_ulong) (_u) - 1)) == 0 ? \
944  mpfr_mul_2si((_f), (_g), - __builtin_ctzl (_u), (_r)) : \
945  mpfr_div_ui ((_f), (_g), (_u), (_r)))
946 #endif
947 
948 /* If the source is a constant number that is non-negative,
949  optimize the call */
950 #undef mpfr_mul_si
951 #define mpfr_mul_si(_f, _g, _s,_r) \
952  (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \
953  mpfr_mul_ui ((_f), (_g), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \
954  mpfr_mul_si ((_f), (_g), (_s), (_r)))
955 #undef mpfr_div_si
956 #define mpfr_div_si(_f, _g, _s,_r) \
957  (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \
958  mpfr_div_ui ((_f), (_g), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \
959  mpfr_div_si ((_f), (_g), (_s), (_r)))
960 
961 #endif
962 #endif
963 
964 /* Macro version of mpfr_stack interface for fast access */
965 #define mpfr_custom_get_size(p) ((mpfr_size_t) \
966  (((p)+GMP_NUMB_BITS-1)/GMP_NUMB_BITS*sizeof (mp_limb_t)))
967 #define mpfr_custom_init(m,p) do {} while (0)
968 #define mpfr_custom_get_significand(x) ((mpfr_void*)((x)->_mpfr_d))
969 #define mpfr_custom_get_exp(x) ((x)->_mpfr_exp)
970 #define mpfr_custom_move(x,m) do { ((x)->_mpfr_d = (mp_limb_t*)(m)); } while (0)
971 #define mpfr_custom_init_set(x,k,e,p,m) do { \
972  mpfr_ptr _x = (x); \
973  mpfr_exp_t _e; \
974  mpfr_kind_t _t; \
975  mpfr_int _s, _k; \
976  _k = (k); \
977  if (_k >= 0) { \
978  _t = (mpfr_kind_t) _k; \
979  _s = 1; \
980  } else { \
981  _t = (mpfr_kind_t) - _k; \
982  _s = -1; \
983  } \
984  _e = _t == MPFR_REGULAR_KIND ? (e) : \
985  _t == MPFR_NAN_KIND ? __MPFR_EXP_NAN : \
986  _t == MPFR_INF_KIND ? __MPFR_EXP_INF : __MPFR_EXP_ZERO; \
987  _x->_mpfr_prec = (p); \
988  _x->_mpfr_sign = _s; \
989  _x->_mpfr_exp = _e; \
990  _x->_mpfr_d = (mp_limb_t*) (m); \
991  } while (0)
992 #define mpfr_custom_get_kind(x) \
993  ( (x)->_mpfr_exp > __MPFR_EXP_INF ? \
994  (mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (x) \
995  : (x)->_mpfr_exp == __MPFR_EXP_INF ? \
996  (mpfr_int) MPFR_INF_KIND * MPFR_SIGN (x) \
997  : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (mpfr_int) MPFR_NAN_KIND \
998  : (mpfr_int) MPFR_ZERO_KIND * MPFR_SIGN (x) )
999 
1000 
1001 #endif /* MPFR_USE_NO_MACRO */
1002 
1003 /* These are defined to be macros */
1004 #define mpfr_init_set_si(x, i, rnd) \
1005  ( mpfr_init(x), mpfr_set_si((x), (i), (rnd)) )
1006 #define mpfr_init_set_ui(x, i, rnd) \
1007  ( mpfr_init(x), mpfr_set_ui((x), (i), (rnd)) )
1008 #define mpfr_init_set_d(x, d, rnd) \
1009  ( mpfr_init(x), mpfr_set_d((x), (d), (rnd)) )
1010 #define mpfr_init_set_ld(x, d, rnd) \
1011  ( mpfr_init(x), mpfr_set_ld((x), (d), (rnd)) )
1012 #define mpfr_init_set_z(x, i, rnd) \
1013  ( mpfr_init(x), mpfr_set_z((x), (i), (rnd)) )
1014 #ifndef MPFR_USE_MINI_GMP
1015 #define mpfr_init_set_q(x, i, rnd) \
1016  ( mpfr_init(x), mpfr_set_q((x), (i), (rnd)) )
1017 #define mpfr_init_set_f(x, y, rnd) \
1018  ( mpfr_init(x), mpfr_set_f((x), (y), (rnd)) )
1019 #endif
1020 #define mpfr_init_set(x, y, rnd) \
1021  ( mpfr_init(x), mpfr_set((x), (y), (rnd)) )
1022 
1023 /* Compatibility layer -- obsolete functions and macros */
1024 /* Note: it is not possible to output warnings, unless one defines
1025  * a deprecated variable and uses it, e.g.
1026  * MPFR_DEPRECATED extern int mpfr_deprecated_feature;
1027  * #define MPFR_EMIN_MIN ((void)mpfr_deprecated_feature,mpfr_get_emin_min())
1028  * (the cast to void avoids a warning because the left-hand operand
1029  * has no effect).
1030  */
1031 #define mpfr_cmp_abs mpfr_cmpabs
1032 #define mpfr_round_prec(x,r,p) mpfr_prec_round(x,p,r)
1033 #define __gmp_default_rounding_mode (mpfr_get_default_rounding_mode())
1034 #define __mpfr_emin (mpfr_get_emin())
1035 #define __mpfr_emax (mpfr_get_emax())
1036 #define __mpfr_default_fp_bit_precision (mpfr_get_default_fp_bit_precision())
1037 #define MPFR_EMIN_MIN mpfr_get_emin_min()
1038 #define MPFR_EMIN_MAX mpfr_get_emin_max()
1039 #define MPFR_EMAX_MIN mpfr_get_emax_min()
1040 #define MPFR_EMAX_MAX mpfr_get_emax_max()
1041 #define mpfr_version (mpfr_get_version())
1042 #ifndef mpz_set_fr
1043 # define mpz_set_fr mpfr_get_z
1044 #endif
1045 #define mpfr_get_z_exp mpfr_get_z_2exp
1046 #define mpfr_custom_get_mantissa mpfr_custom_get_significand
1047 
1048 #endif /* __MPFR_H */
1049 
1050 
1051 /* Check if <stdint.h> / <inttypes.h> is included or if the user
1052  explicitly wants intmax_t. Automatic detection is done by
1053  checking:
1054  - INTMAX_C and UINTMAX_C, but not if the compiler is a C++ one
1055  (as suggested by Patrick Pelissier) because the test does not
1056  work well in this case. See:
1057  https://sympa.inria.fr/sympa/arc/mpfr/2010-02/msg00025.html
1058  We do not check INTMAX_MAX and UINTMAX_MAX because under Solaris,
1059  these macros are always defined by <limits.h> (i.e. even when
1060  <stdint.h> and <inttypes.h> are not included).
1061  - _STDINT_H (defined by the glibc), _STDINT_H_ (defined under
1062  Mac OS X) and _STDINT (defined under MS Visual Studio), but
1063  this test may not work with all implementations.
1064  Portable software should not rely on these tests.
1065 */
1066 #if (defined (INTMAX_C) && defined (UINTMAX_C) && !defined(__cplusplus)) || \
1067  defined (MPFR_USE_INTMAX_T) || \
1068  defined (_STDINT_H) || defined (_STDINT_H_) || defined (_STDINT) || \
1069  defined (_SYS_STDINT_H_) /* needed for FreeBSD */
1070 # ifndef _MPFR_H_HAVE_INTMAX_T
1071 # define _MPFR_H_HAVE_INTMAX_T 1
1072 
1073 #if defined (__cplusplus)
1074 extern "C" {
1075 #endif
1076 
1077 #define mpfr_set_sj __gmpfr_set_sj
1078 #define mpfr_set_sj_2exp __gmpfr_set_sj_2exp
1079 #define mpfr_set_uj __gmpfr_set_uj
1080 #define mpfr_set_uj_2exp __gmpfr_set_uj_2exp
1081 #define mpfr_get_sj __gmpfr_mpfr_get_sj
1082 #define mpfr_get_uj __gmpfr_mpfr_get_uj
1083 __MPFR_DECLSPEC int mpfr_set_sj (mpfr_t, intmax_t, mpfr_rnd_t);
1084 __MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_t, intmax_t, intmax_t, mpfr_rnd_t);
1085 __MPFR_DECLSPEC int mpfr_set_uj (mpfr_t, uintmax_t, mpfr_rnd_t);
1086 __MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_t, uintmax_t, intmax_t, mpfr_rnd_t);
1089 
1090 #if defined (__cplusplus)
1091 }
1092 #endif
1093 
1094 # endif /* _MPFR_H_HAVE_INTMAX_T */
1095 #endif
1096 
1097 
1098 /* Check if <stdio.h> has been included or if the user wants FILE */
1099 #if defined (_GMP_H_HAVE_FILE) || defined (MPFR_USE_FILE)
1100 # ifndef _MPFR_H_HAVE_FILE
1101 # define _MPFR_H_HAVE_FILE 1
1102 
1103 #if defined (__cplusplus)
1104 extern "C" {
1105 #endif
1106 
1107 #define mpfr_inp_str __gmpfr_inp_str
1108 #define mpfr_out_str __gmpfr_out_str
1109 __MPFR_DECLSPEC size_t mpfr_inp_str (mpfr_ptr, FILE*, int, mpfr_rnd_t);
1110 __MPFR_DECLSPEC size_t mpfr_out_str (FILE*, int, size_t, mpfr_srcptr,
1111  mpfr_rnd_t);
1112 #ifndef MPFR_USE_MINI_GMP
1113 #define mpfr_fprintf __gmpfr_fprintf
1114 __MPFR_DECLSPEC int mpfr_fprintf (FILE*, const char*, ...);
1115 #endif
1116 #define mpfr_fpif_export __gmpfr_fpif_export
1117 #define mpfr_fpif_import __gmpfr_fpif_import
1118 __MPFR_DECLSPEC int mpfr_fpif_export (FILE*, mpfr_ptr);
1119 __MPFR_DECLSPEC int mpfr_fpif_import (mpfr_ptr, FILE*);
1120 
1121 #if defined (__cplusplus)
1122 }
1123 #endif
1124 
1125 # endif /* _MPFR_H_HAVE_FILE */
1126 #endif
1127 
1128 
1129 /* check if <stdarg.h> has been included or if the user wants va_list */
1130 #if defined (_GMP_H_HAVE_VA_LIST) || defined (MPFR_USE_VA_LIST)
1131 # ifndef _MPFR_H_HAVE_VA_LIST
1132 # define _MPFR_H_HAVE_VA_LIST 1
1133 
1134 #if defined (__cplusplus)
1135 extern "C" {
1136 #endif
1137 
1138 #define mpfr_vprintf __gmpfr_vprintf
1139 #define mpfr_vasprintf __gmpfr_vasprintf
1140 #define mpfr_vsprintf __gmpfr_vsprintf
1141 #define mpfr_vsnprintf __gmpfr_vsnprintf
1142 __MPFR_DECLSPEC int mpfr_vprintf (const char*, va_list);
1143 __MPFR_DECLSPEC int mpfr_vasprintf (char**, const char*, va_list);
1144 __MPFR_DECLSPEC int mpfr_vsprintf (char*, const char*, va_list);
1145 __MPFR_DECLSPEC int mpfr_vsnprintf (char*, size_t, const char*, va_list);
1146 
1147 #if defined (__cplusplus)
1148 }
1149 #endif
1150 
1151 # endif /* _MPFR_H_HAVE_VA_LIST */
1152 #endif
1153 
1154 
1155 /* check if <stdarg.h> has been included and if FILE is available
1156  (see above) */
1157 #if defined (_MPFR_H_HAVE_VA_LIST) && defined (_MPFR_H_HAVE_FILE)
1158 # ifndef _MPFR_H_HAVE_VA_LIST_FILE
1159 # define _MPFR_H_HAVE_VA_LIST_FILE 1
1160 
1161 #if defined (__cplusplus)
1162 extern "C" {
1163 #endif
1164 
1165 #define mpfr_vfprintf __gmpfr_vfprintf
1166 __MPFR_DECLSPEC int mpfr_vfprintf (FILE*, const char*, va_list);
1167 
1168 #if defined (__cplusplus)
1169 }
1170 #endif
1171 
1172 # endif /* _MPFR_H_HAVE_VA_LIST_FILE */
1173 #endif
q
Definition: afm2pl.c:2287
Definition: asl.h:63
int z
Definition: dviconv.c:26
mpz_t * f
Definition: gen-fib.c:34
__gmp_randstate_struct gmp_randstate_t[1]
Definition: gmp.h:220
int64_t intmax_t
Definition: stdint.h:123
uint64_t uintmax_t
Definition: stdint.h:124
int mpfr_roundeven(mpfr_ptr, mpfr_srcptr)
Definition: rint.c:310
#define mpfr_floor(a, b)
Definition: mpfr.h:860
int mpfr_frac(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: frac.c:31
int mpfr_gamma(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: gamma.c:113
int mpfr_fits_sint_p(mpfr_srcptr, mpfr_rnd_t)
unsigned long mpfr_get_ui(mpfr_srcptr, mpfr_rnd_t)
Definition: get_ui.c:26
#define mpfr_custom_get_kind(x)
Definition: mpfr.h:992
int mpfr_log2(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: log2.c:30
int mpfr_fma(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: fma.c:99
int mpfr_ui_pow(mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t)
int mpfr_add_d(mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
Definition: add_d.c:27
int mpfr_cmp_ui_2exp(mpfr_srcptr, unsigned long, mpfr_exp_t)
#define mpfr_inf_p(_x)
Definition: mpfr.h:838
int mpfr_rint_ceil(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rint.c:430
void mpfr_clear_inexflag(void)
Definition: exceptions.c:188
void mpfr_clear_overflow(void)
Definition: exceptions.c:164
void mpfr_set_nan(mpfr_ptr)
Definition: set_nan.c:27
int mpfr_overflow_p(void)
Definition: exceptions.c:323
int mpfr_div_2ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
Definition: div_2ui.c:26
void mpfr_swap(mpfr_ptr, mpfr_ptr)
Definition: swap.c:28
int mpfr_mul_si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
#define __MPFR_SENTINEL_ATTR
Definition: mpfr.h:284
void mpfr_flags_restore(mpfr_flags_t, mpfr_flags_t)
Definition: exceptions.c:137
mpfr_exp_t mpfr_get_emin_max(void)
Definition: exceptions.c:60
int mpfr_acos(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: acos.c:27
int mpfr_j1(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: jn.c:40
mpfr_exp_t mpfr_get_emax(void)
Definition: exceptions.c:68
void mpfr_clear_flags(void)
Definition: exceptions.c:148
#define mpfr_zero_p(_x)
Definition: mpfr.h:839
#define mpfr_custom_get_significand(x)
Definition: mpfr.h:968
int mpfr_unordered_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:75
int mpfr_rec_sqrt(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rec_sqrt.c:459
unsigned int mpfr_uint
Definition: mpfr.h:63
int mpfr_csc(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
int mpfr_pow(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: pow.c:380
int mpfr_y1(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: yn.c:36
int mpfr_div_q(mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:264
#define mpfr_nan_p(_x)
Definition: mpfr.h:837
int mpfr_remquo(mpfr_ptr, long *, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rem1.c:259
int mpfr_cmp_z(mpfr_srcptr, mpz_srcptr)
Definition: gmp_op.c:134
#define MPFR_DEPRECATED
Definition: mpfr.h:351
int mpfr_greater_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:39
void mpfr_set_divby0(void)
Definition: exceptions.c:220
mpfr_prec_t mpfr_min_prec(mpfr_srcptr)
Definition: min_prec.c:26
int mpfr_strtofr(mpfr_ptr, const char *, char **, int, mpfr_rnd_t)
int mpfr_y0(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: yn.c:30
int mpfr_sin_cos(mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sin_cos.c:29
#define mpfr_setsign(a, b, s, r)
Definition: mpfr.h:867
int mpfr_add_ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
int mpfr_divby0_p(void)
Definition: exceptions.c:332
int mpfr_integer_p(mpfr_srcptr)
Definition: isinteger.c:27
int mpfr_urandomb(mpfr_ptr, gmp_randstate_t)
Definition: urandomb.c:50
int mpfr_expm1(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: expm1.c:31
int mpfr_cmp3(mpfr_srcptr, mpfr_srcptr, int)
Definition: cmp.c:32
int mpfr_d_sub(mpfr_ptr, double, mpfr_srcptr, mpfr_rnd_t)
Definition: d_sub.c:27
mpfr_exp_t mpfr_get_z_2exp(mpz_ptr, mpfr_srcptr)
Definition: get_z_exp.c:52
int mpfr_lessgreater_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:63
int mpfr_nanflag_p(void)
Definition: exceptions.c:341
int mpfr_const_pi(mpfr_ptr, mpfr_rnd_t)
Definition: const_pi.c:37
int mpfr_root(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
Definition: root.c:301
int mpfr_neg(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: neg.c:26
int mpfr_round_nearest_away_end(mpfr_t, int)
Definition: rndna.c:132
int mpfr_div_si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
unsigned long mpfr_uexp_t
Definition: mpfr.h:196
int mpfr_mul_q(mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:258
int mpfr_erangeflag_p(void)
Definition: exceptions.c:359
int mpfr_can_round(mpfr_srcptr, mpfr_exp_t, mpfr_rnd_t, mpfr_rnd_t, mpfr_prec_t)
Definition: round_prec.c:160
int mpfr_urandom(mpfr_ptr, gmp_randstate_t, mpfr_rnd_t)
Definition: urandom.c:54
int mpfr_set_flt(mpfr_ptr, float, mpfr_rnd_t)
Definition: set_flt.c:26
int mpfr_sinh_cosh(mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sinh_cosh.c:32
int mpfr_ui_div(mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t)
#define mpfr_custom_move(x, m)
Definition: mpfr.h:970
void mpfr_set_overflow(void)
Definition: exceptions.c:212
mpfr_prec_t mpfr_get_default_prec(void)
Definition: set_dfl_prec.c:38
int mpfr_lngamma(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: lngamma.c:721
int mpfr_sqr(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sqr.c:508
int mpfr_const_euler(mpfr_ptr, mpfr_rnd_t)
Definition: const_euler.c:35
int mpfr_const_log2(mpfr_ptr, mpfr_rnd_t)
Definition: const_log2.c:38
int mpfr_set_d(mpfr_ptr, double, mpfr_rnd_t)
Definition: set_d.c:242
int mpfr_add_si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
#define mpfr_copysign(a, b, c, r)
Definition: mpfr.h:866
int mpfr_sec(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
int mpfr_rint_floor(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rint.c:456
int mpfr_cot(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
void mpfr_clear_divby0(void)
Definition: exceptions.c:172
int mpfr_atan(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: atan.c:286
int mpfr_get_z(mpz_ptr z, mpfr_srcptr f, mpfr_rnd_t)
Definition: get_z.c:27
double mpfr_get_d(mpfr_srcptr, mpfr_rnd_t)
Definition: get_d.c:36
void mpfr_inits(mpfr_ptr,...)
void mpfr_free_pool(void)
Definition: pool.c:107
int mpfr_subnormalize(mpfr_ptr, int, mpfr_rnd_t)
Definition: subnormal.c:47
void mpfr_dump(mpfr_srcptr)
Definition: dump.c:129
int mpfr_pow_si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
int mpfr_div(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: div.c:748
int mpfr_sprintf(char *, const char *,...)
int mpfr_sub_ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
__mpfr_struct * mpfr_ptr
Definition: mpfr.h:251
int mpfr_ai(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: ai.c:644
mpfr_flags_t mpfr_flags_test(mpfr_flags_t)
Definition: exceptions.c:121
int mpfr_inexflag_p(void)
Definition: exceptions.c:350
int mpfr_mul_z(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:89
unsigned long mpfr_uprec_t
Definition: mpfr.h:169
int mpfr_zeta_ui(mpfr_ptr, unsigned long, mpfr_rnd_t)
Definition: zeta_ui.c:27
const char * mpfr_get_version(void)
Definition: mplibstuff.c:102
int mpfr_eq(mpfr_srcptr, mpfr_srcptr, unsigned long)
int mpfr_nrandom(mpfr_ptr, gmp_randstate_t, mpfr_rnd_t)
int mpfr_pow_ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
#define mpfr_cmp_si(b, i)
Definition: mpfr.h:863
int mpfr_asin(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: asin.c:26
void mpfr_extract(mpz_ptr, mpfr_srcptr, unsigned int)
Definition: extract.c:34
int mpfr_rint_trunc(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rint.c:407
#define mpfr_custom_init(m, p)
Definition: mpfr.h:967
long mpfr_prec_t
Definition: mpfr.h:168
void mpfr_free_cache(void)
Definition: free_cache.c:54
int mpfr_equal_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:69
float mpfr_get_flt(mpfr_srcptr, mpfr_rnd_t)
Definition: get_flt.c:35
int mpfr_digamma(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: digamma.c:304
void mpfr_set_inf(mpfr_ptr, int)
Definition: set_inf.c:26
int mpfr_rootn_ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
Definition: root.c:48
int mpfr_fits_slong_p(mpfr_srcptr, mpfr_rnd_t)
const char * mpfr_get_patches(void)
#define MPFR_RETURNS_NONNULL
Definition: mpfr.h:363
void mpfr_init2(mpfr_ptr, mpfr_prec_t)
Definition: init2.c:26
int mpfr_asprintf(char **, const char *,...)
int mpfr_erandom(mpfr_ptr, gmp_randstate_t, mpfr_rnd_t)
int mpfr_lgamma(mpfr_ptr, int *, mpfr_srcptr, mpfr_rnd_t)
Definition: lngamma.c:761
int mpfr_fits_intmax_p(mpfr_srcptr, mpfr_rnd_t)
void mpfr_nextbelow(mpfr_ptr)
Definition: next.c:121
double mpfr_get_d1(mpfr_srcptr)
Definition: get_d.c:134
int mpfr_atan2(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: atan2.c:48
#define mpfr_set(a, b, r)
Definition: mpfr.h:864
int mpfr_cmp_ld(mpfr_srcptr, long double)
Definition: cmp_ld.c:28
int mpfr_erfc(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: erfc.c:124
int mpfr_pow_z(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
Definition: pow_z.c:167
mpfr_kind_t
Definition: mpfr.h:263
@ MPFR_REGULAR_KIND
Definition: mpfr.h:267
@ MPFR_ZERO_KIND
Definition: mpfr.h:266
@ MPFR_INF_KIND
Definition: mpfr.h:265
@ MPFR_NAN_KIND
Definition: mpfr.h:264
__mpfr_struct mpfr_t[1]
Definition: mpfr.h:250
long double mpfr_get_ld(mpfr_srcptr, mpfr_rnd_t)
Definition: get_ld.c:185
void mpfr_set_prec_raw(mpfr_ptr, mpfr_prec_t)
Definition: set_prc_raw.c:26
size_t mpfr_size_t
Definition: mpfr.h:66
int mpfr_eint(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: eint.c:225
int mpfr_modf(mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: modf.c:27
void mpfr_get_q(mpq_ptr q, mpfr_srcptr f)
Definition: get_q.c:29
int mpfr_add(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: add.c:26
int mpfr_log10(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: log10.c:32
int mpfr_mul_2si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
void mpfr_clear(mpfr_ptr)
Definition: clear.c:26
int mpfr_ui_sub(mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t)
int mpfr_si_sub(mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t)
int mpfr_exp10(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: exp10.c:26
long mpfr_get_si(mpfr_srcptr, mpfr_rnd_t)
Definition: get_si.c:26
int mpfr_fmms(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: fmma.c:88
int mpfr_cbrt(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: cbrt.c:49
int mpfr_set_z_2exp(mpfr_ptr, mpz_srcptr, mpfr_exp_t, mpfr_rnd_t)
Definition: set_z_exp.c:29
int mpfr_beta(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: beta.c:29
int mpfr_set_emin(mpfr_exp_t)
Definition: exceptions.c:40
int mpfr_sqrt_ui(mpfr_ptr, unsigned long, mpfr_rnd_t)
Definition: sqrt_ui.c:27
int mpfr_cmpabs(mpfr_srcptr, mpfr_srcptr)
Definition: cmpabs.c:29
int mpfr_ui_pow_ui(mpfr_ptr, unsigned long, unsigned long, mpfr_rnd_t)
int mpfr_const_catalan(mpfr_ptr, mpfr_rnd_t)
Definition: const_catalan.c:32
#define mpfr_div_2exp(y, x, n, r)
Definition: mpfr.h:871
int mpfr_coth(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
int mpfr_agm(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: agm.c:28
int mpfr_cmp_d(mpfr_srcptr, double)
Definition: cmp_d.c:26
#define mpfr_custom_init_set(x, k, e, p, m)
Definition: mpfr.h:971
void mpfr_flags_clear(mpfr_flags_t)
Definition: exceptions.c:105
int mpfr_z_sub(mpfr_ptr, mpz_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:125
int mpfr_check_range(mpfr_ptr, int, mpfr_rnd_t)
Definition: exceptions.c:256
#define __MPFR_DECLSPEC
Definition: mpfr.h:323
int mpfr_fits_sshort_p(mpfr_srcptr, mpfr_rnd_t)
int mpfr_log(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: log.c:42
int mpfr_mp_memory_cleanup(void)
Definition: free_cache.c:88
void mpfr_round_nearest_away_begin(mpfr_t)
Definition: rndna.c:64
int mpfr_cmp_q(mpfr_srcptr, mpq_srcptr)
Definition: gmp_op.c:456
int mpfr_dot(mpfr_ptr, const mpfr_ptr *, const mpfr_ptr *, unsigned long, mpfr_rnd_t)
Definition: dot.c:29
int mpfr_buildopt_sharedcache_p(void)
Definition: buildopt.c:67
int mpfr_sum(mpfr_ptr, const mpfr_ptr *, unsigned long, mpfr_rnd_t)
Definition: sum.c:1266
int mpfr_printf(const char *,...)
#define mpfr_ceil(a, b)
Definition: mpfr.h:859
#define mpfr_custom_get_exp(x)
Definition: mpfr.h:969
int mpfr_exp2(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: exp2.c:30
int mpfr_set_si(mpfr_ptr, long, mpfr_rnd_t)
Definition: set_si.c:27
long double mpfr_get_ld_2exp(long *, mpfr_srcptr, mpfr_rnd_t)
Definition: get_ld.c:307
int mpfr_fmod(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rem1.c:266
int mpfr_set_si_2exp(mpfr_ptr, long, mpfr_exp_t, mpfr_rnd_t)
Definition: set_si_2exp.c:28
int mpfr_asinh(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: asinh.c:30
void mpfr_free_str(char *)
Definition: get_str.c:2899
int mpfr_frexp(mpfr_exp_t *, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: frexp.c:26
char * mpfr_get_str(char *, mpfr_exp_t *, int, size_t, mpfr_srcptr, mpfr_rnd_t)
Definition: get_str.c:2563
int mpfr_fits_ushort_p(mpfr_srcptr, mpfr_rnd_t)
int mpfr_buildopt_gmpinternals_p(void)
Definition: buildopt.c:57
#define mpfr_regular_p(_x)
Definition: mpfr.h:840
const char * mpfr_buildopt_tune_case(void)
Definition: buildopt.c:76
int mpfr_tanh(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: tanh.c:27
#define mpfr_custom_get_size(p)
Definition: mpfr.h:965
int mpfr_div_z(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:98
int mpfr_max(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: minmax.c:67
#define mpfr_get_prec(_x)
Definition: mpfr.h:848
int mpfr_tan(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: tan.c:28
int mpfr_set_q(mpfr_ptr, mpq_srcptr, mpfr_rnd_t)
Definition: set_q.c:65
mpfr_exp_t mpfr_get_emax_max(void)
Definition: exceptions.c:96
int mpfr_grandom(mpfr_ptr, mpfr_ptr, gmp_randstate_t, mpfr_rnd_t)
Definition: grandom.c:32
int mpfr_int
Definition: mpfr.h:62
int mpfr_log_ui(mpfr_ptr, unsigned long, mpfr_rnd_t)
Definition: log_ui.c:88
int mpfr_fits_uint_p(mpfr_srcptr, mpfr_rnd_t)
#define mpfr_sgn(_x)
Definition: mpfr.h:841
int mpfr_less_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:51
int mpfr_j0(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: jn.c:34
void mpfr_clear_erangeflag(void)
Definition: exceptions.c:196
int mpfr_remainder(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rem1.c:253
int mpfr_set_ui(mpfr_ptr, unsigned long, mpfr_rnd_t)
Definition: set_ui.c:27
#define mpfr_get_exp(_x)
Definition: mpfr.h:849
int mpfr_rint(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rint.c:37
void mpfr_set_default_rounding_mode(mpfr_rnd_t)
Definition: set_rnd.c:29
mpfr_exp_t mpfr_get_emin_min(void)
Definition: exceptions.c:54
int mpfr_fac_ui(mpfr_ptr, unsigned long, mpfr_rnd_t)
void mpfr_set_default_prec(mpfr_prec_t)
Definition: set_dfl_prec.c:30
int mpfr_get_f(mpf_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: get_f.c:32
int mpfr_si_div(mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t)
void mpfr_init(mpfr_ptr)
Definition: init.c:26
int mpfr_sech(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
void mpfr_inits2(mpfr_prec_t, mpfr_ptr,...)
int mpfr_d_div(mpfr_ptr, double, mpfr_srcptr, mpfr_rnd_t)
Definition: d_div.c:27
int mpfr_mul_2ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
int mpfr_li2(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: li2.c:215
void mpfr_set_underflow(void)
Definition: exceptions.c:204
int mpfr_set_f(mpfr_ptr, mpf_srcptr, mpfr_rnd_t)
Definition: set_f.c:29
int mpfr_mul_d(mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
Definition: mul_d.c:27
int mpfr_cmp_si_2exp(mpfr_srcptr, long, mpfr_exp_t)
void mpfr_clear_underflow(void)
Definition: exceptions.c:156
int mpfr_min(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: minmax.c:33
int mpfr_add_q(mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:270
int mpfr_erf(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: erf.c:29
int mpfr_fms(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: fms.c:31
mpfr_exp_t mpfr_get_emax_min(void)
Definition: exceptions.c:90
int mpfr_rint_roundeven(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rint.c:355
#define mpfr_abs(a, b, r)
Definition: mpfr.h:865
void mpfr_clear_nanflag(void)
Definition: exceptions.c:180
int mpfr_fmodquo(mpfr_ptr, long *, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rem1.c:272
int mpfr_cosh(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: cosh.c:30
size_t mpfr_get_str_ndigits(int, mpfr_prec_t)
Definition: get_str.c:2485
int mpfr_sub_d(mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
Definition: sub_d.c:27
int mpfr_sub_si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
#define mpfr_mul_2exp(y, x, n, r)
Definition: mpfr.h:870
#define mpfr_cmp_ui(b, i)
Definition: mpfr.h:862
int mpfr_sub_z(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:116
int mpfr_log1p(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: log1p.c:102
unsigned long mpfr_ulong
Definition: mpfr.h:65
int mpfr_cos(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: cos.c:133
#define mpfr_trunc(a, b)
Definition: mpfr.h:858
int mpfr_zeta(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
int mpfr_set_ld(mpfr_ptr, long double, mpfr_rnd_t)
Definition: set_ld.c:239
int mpfr_sub_q(mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:360
int mpfr_set_ui_2exp(mpfr_ptr, unsigned long, mpfr_exp_t, mpfr_rnd_t)
Definition: set_ui_2exp.c:28
int mpfr_set4(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t, int)
Definition: set.c:27
int mpfr_hypot(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: hypot.c:30
unsigned int mpfr_flags_t
Definition: mpfr.h:74
int mpfr_underflow_p(void)
Definition: exceptions.c:314
int mpfr_fmma(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: fmma.c:80
mpfr_rnd_t
Definition: mpfr.h:102
@ MPFR_RNDA
Definition: mpfr.h:107
@ MPFR_RNDF
Definition: mpfr.h:108
@ MPFR_RNDN
Definition: mpfr.h:103
@ MPFR_RNDU
Definition: mpfr.h:105
@ MPFR_RNDD
Definition: mpfr.h:106
@ MPFR_RNDNA
Definition: mpfr.h:109
@ MPFR_RNDZ
Definition: mpfr.h:104
long mpfr_long
Definition: mpfr.h:64
int mpfr_div_ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
#define mpfr_signbit(x)
Definition: mpfr.h:868
int mpfr_gamma_inc(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: gamma_inc.c:47
int mpfr_yn(mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t)
Definition: yn.c:150
void mpfr_set_erangeflag(void)
Definition: exceptions.c:244
int mpfr_total_order_p(mpfr_srcptr, mpfr_srcptr)
Definition: total_order.c:27
int mpfr_rint_round(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: rint.c:381
int mpfr_buildopt_tls_p(void)
Definition: buildopt.c:27
int mpfr_add_z(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t)
Definition: gmp_op.c:107
int mpfr_number_p(mpfr_srcptr)
Definition: isnum.c:26
void mpfr_free_cache2(mpfr_free_cache_t)
Definition: free_cache.c:61
mpfr_free_cache_t
Definition: mpfr.h:271
@ MPFR_FREE_GLOBAL_CACHE
Definition: mpfr.h:273
@ MPFR_FREE_LOCAL_CACHE
Definition: mpfr.h:272
int mpfr_sin(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sin.c:37
const __mpfr_struct * mpfr_srcptr
Definition: mpfr.h:252
int mpfr_set_exp(mpfr_ptr, mpfr_exp_t)
Definition: set_exp.c:26
void mpfr_nexttoward(mpfr_ptr, mpfr_srcptr)
Definition: next.c:136
double mpfr_get_d_2exp(long *, mpfr_srcptr, mpfr_rnd_t)
Definition: get_d.c:140
#define mpfr_round(a, b)
Definition: mpfr.h:857
void mpfr_set_nanflag(void)
Definition: exceptions.c:228
int mpfr_fits_ulong_p(mpfr_srcptr, mpfr_rnd_t)
int mpfr_cmpabs_ui(mpfr_srcptr, unsigned long)
Definition: cmpabs_ui.c:29
int mpfr_div_2si(mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t)
int mpfr_csch(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
int mpfr_buildopt_decimal_p(void)
Definition: buildopt.c:47
int mpfr_prec_round(mpfr_ptr, mpfr_prec_t, mpfr_rnd_t)
Definition: round_prec.c:53
int mpfr_init_set_str(mpfr_ptr, const char *, int, mpfr_rnd_t)
Definition: set_str.c:38
void mpfr_set_inexflag(void)
Definition: exceptions.c:236
mpfr_exp_t mpfr_get_emin(void)
Definition: exceptions.c:32
int mpfr_acosh(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: acosh.c:30
mpfr_flags_t mpfr_flags_save(void)
Definition: exceptions.c:129
void mpfr_void
Definition: mpfr.h:61
int mpfr_dim(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: dim.c:32
int mpfr_fits_uintmax_p(mpfr_srcptr, mpfr_rnd_t)
int mpfr_sqrt(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sqrt.c:498
int mpfr_set_str(mpfr_ptr, const char *, int, mpfr_rnd_t)
int mpfr_lessequal_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:57
long mpfr_exp_t
Definition: mpfr.h:195
int mpfr_set_z(mpfr_ptr, mpz_srcptr, mpfr_rnd_t)
Definition: set_z.c:27
mpfr_rnd_t mpfr_get_default_rounding_mode(void)
Definition: set_rnd.c:37
int mpfr_div_d(mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t)
Definition: div_d.c:27
int mpfr_set_emax(mpfr_exp_t)
Definition: exceptions.c:76
void mpfr_flags_set(mpfr_flags_t)
Definition: exceptions.c:113
void mpfr_reldiff(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: reldiff.c:27
#define mpfr_cmp(b, c)
Definition: mpfr.h:869
int mpfr_mul_ui(mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t)
int mpfr_cmp_f(mpfr_srcptr, mpf_srcptr)
Definition: gmp_op.c:500
int mpfr_sinh(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sinh.c:30
void mpfr_nextabove(mpfr_ptr)
Definition: next.c:107
int mpfr_jn(mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t)
Definition: jn.c:83
int mpfr_snprintf(char *, size_t, const char *,...)
int mpfr_mul(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: mul.c:732
void mpfr_clears(mpfr_ptr,...)
void mpfr_set_zero(mpfr_ptr, int)
Definition: set_zero.c:26
int mpfr_greaterequal_p(mpfr_srcptr, mpfr_srcptr)
Definition: comparisons.c:45
int mpfr_buildopt_float128_p(void)
Definition: buildopt.c:37
int mpfr_sub(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t)
Definition: sub.c:26
int mpfr_exp(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: exp.c:36
const char * mpfr_print_rnd_mode(mpfr_rnd_t)
void mpfr_set_prec(mpfr_ptr, mpfr_prec_t)
Definition: set_prec.c:26
int mpfr_atanh(mpfr_ptr, mpfr_srcptr, mpfr_rnd_t)
Definition: atanh.c:103
int mpfr_sign_t
Definition: mpfr.h:184
mpfr_exp_t _mpfr_exp
Definition: mpfr.h:227
mpfr_sign_t _mpfr_sign
Definition: mpfr.h:226
mp_limb_t * _mpfr_d
Definition: mpfr.h:228
mpfr_prec_t _mpfr_prec
Definition: mpfr.h:225
#define FILE
Definition: t1stdio.h:34
char * va_list
Definition: varargs.h:22