/ src / gmpy2_mpfr_misc.h
gmpy2_mpfr_misc.h
 1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 2   * gmpy2_mpfr_misc.h                                                       *
 3   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 4   * Python interface to the GMP or MPIR, MPFR, and MPC multiple precision   *
 5   * libraries.                                                              *
 6   *                                                                         *
 7   * Copyright 2000 - 2009 Alex Martelli                                     *
 8   *                                                                         *
 9   * Copyright 2008 - 2021 Case Van Horsen                                   *
10   *                                                                         *
11   * This file is part of GMPY2.                                             *
12   *                                                                         *
13   * GMPY2 is free software: you can redistribute it and/or modify it under  *
14   * the terms of the GNU Lesser General Public License as published by the  *
15   * Free Software Foundation, either version 3 of the License, or (at your  *
16   * option) any later version.                                              *
17   *                                                                         *
18   * GMPY2 is distributed in the hope that it will be useful, but WITHOUT    *
19   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or   *
20   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public    *
21   * License for more details.                                               *
22   *                                                                         *
23   * You should have received a copy of the GNU Lesser General Public        *
24   * License along with GMPY2; if not, see <http://www.gnu.org/licenses/>    *
25   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26  
27  #ifndef GMPY_MPFR_MISC_H
28  #define GMPY_MPFR_MISC_H
29  
30  #ifdef __cplusplus
31  extern "C" {
32  #endif
33  
34  static PyObject * GMPy_Real_F2Q(PyObject *x, PyObject *y, CTXT_Object *context);
35  
36  static PyObject * GMPy_MPFR_Free_Cache(PyObject *self, PyObject *args);
37  static PyObject * GMPy_MPFR_Can_Round(PyObject *self, PyObject *args);
38  static PyObject * GMPy_MPFR_get_emax_max(PyObject *self, PyObject *args);
39  static PyObject * GMPy_MPFR_get_max_precision(PyObject *self, PyObject *args);
40  static PyObject * GMPy_MPFR_get_exp(PyObject *self, PyObject *other);
41  static PyObject * GMPy_MPFR_set_exp(PyObject *self, PyObject *args);
42  static PyObject * GMPy_MPFR_set_sign(PyObject *self, PyObject *args);
43  static PyObject * GMPy_MPFR_copy_sign(PyObject *self, PyObject *args);
44  static PyObject * GMPy_MPFR_Integer_Ratio_Method(PyObject *self, PyObject *args);
45  static PyObject * GMPy_MPFR_Mantissa_Exp_Method(PyObject *self, PyObject *args);
46  static PyObject * GMPy_MPFR_Simple_Fraction_Method(PyObject *self, PyObject *args, PyObject *keywds);
47  static PyObject * GMPy_MPFR_set_nan(PyObject *self, PyObject *other);
48  static PyObject * GMPy_MPFR_set_inf(PyObject *self, PyObject *args);
49  static PyObject * GMPy_MPFR_set_zero(PyObject *self, PyObject *args);
50  
51  static PyObject * GMPy_MPFR_GetPrec_Attrib(MPFR_Object *self, void *closure);
52  static PyObject * GMPy_MPFR_GetRc_Attrib(MPFR_Object *self, void *closure);
53  static PyObject * GMPy_MPFR_GetImag_Attrib(MPFR_Object *self, void *closure);
54  static PyObject * GMPy_MPFR_GetReal_Attrib(MPFR_Object *self, void *closure);
55  static int        GMPy_MPFR_NonZero_Slot(MPFR_Object *self);
56  static PyObject * GMPy_MPFR_SizeOf_Method(PyObject *self, PyObject *other);
57  
58  static PyObject * GMPy_MPFR_CheckRange(PyObject *x, CTXT_Object *context);
59  static PyObject * GMPy_Number_CheckRange(PyObject *x, CTXT_Object *context);
60  static PyObject * GMPy_Context_CheckRange(PyObject *self, PyObject *other);
61  
62  static PyObject * GMPy_MPFR_Method_Round10(PyObject *self, PyObject *args);
63  
64  #ifdef __cplusplus
65  }
66  #endif
67  #endif