Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/python3....
File: floatobject.h
[0] Fix | Delete
/* Float object interface */
[1] Fix | Delete
[2] Fix | Delete
/*
[3] Fix | Delete
PyFloatObject represents a (double precision) floating point number.
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
#ifndef Py_FLOATOBJECT_H
[7] Fix | Delete
#define Py_FLOATOBJECT_H
[8] Fix | Delete
#ifdef __cplusplus
[9] Fix | Delete
extern "C" {
[10] Fix | Delete
#endif
[11] Fix | Delete
[12] Fix | Delete
#ifndef Py_LIMITED_API
[13] Fix | Delete
typedef struct {
[14] Fix | Delete
PyObject_HEAD
[15] Fix | Delete
double ob_fval;
[16] Fix | Delete
} PyFloatObject;
[17] Fix | Delete
#endif
[18] Fix | Delete
[19] Fix | Delete
PyAPI_DATA(PyTypeObject) PyFloat_Type;
[20] Fix | Delete
[21] Fix | Delete
#define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type)
[22] Fix | Delete
#define PyFloat_CheckExact(op) (Py_TYPE(op) == &PyFloat_Type)
[23] Fix | Delete
[24] Fix | Delete
#ifdef Py_NAN
[25] Fix | Delete
#define Py_RETURN_NAN return PyFloat_FromDouble(Py_NAN)
[26] Fix | Delete
#endif
[27] Fix | Delete
[28] Fix | Delete
#define Py_RETURN_INF(sign) do \
[29] Fix | Delete
if (copysign(1., sign) == 1.) { \
[30] Fix | Delete
return PyFloat_FromDouble(Py_HUGE_VAL); \
[31] Fix | Delete
} else { \
[32] Fix | Delete
return PyFloat_FromDouble(-Py_HUGE_VAL); \
[33] Fix | Delete
} while(0)
[34] Fix | Delete
[35] Fix | Delete
PyAPI_FUNC(double) PyFloat_GetMax(void);
[36] Fix | Delete
PyAPI_FUNC(double) PyFloat_GetMin(void);
[37] Fix | Delete
PyAPI_FUNC(PyObject *) PyFloat_GetInfo(void);
[38] Fix | Delete
[39] Fix | Delete
/* Return Python float from string PyObject. */
[40] Fix | Delete
PyAPI_FUNC(PyObject *) PyFloat_FromString(PyObject*);
[41] Fix | Delete
[42] Fix | Delete
/* Return Python float from C double. */
[43] Fix | Delete
PyAPI_FUNC(PyObject *) PyFloat_FromDouble(double);
[44] Fix | Delete
[45] Fix | Delete
/* Extract C double from Python float. The macro version trades safety for
[46] Fix | Delete
speed. */
[47] Fix | Delete
PyAPI_FUNC(double) PyFloat_AsDouble(PyObject *);
[48] Fix | Delete
#ifndef Py_LIMITED_API
[49] Fix | Delete
#define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
[50] Fix | Delete
#endif
[51] Fix | Delete
[52] Fix | Delete
#ifndef Py_LIMITED_API
[53] Fix | Delete
/* _PyFloat_{Pack,Unpack}{4,8}
[54] Fix | Delete
*
[55] Fix | Delete
* The struct and pickle (at least) modules need an efficient platform-
[56] Fix | Delete
* independent way to store floating-point values as byte strings.
[57] Fix | Delete
* The Pack routines produce a string from a C double, and the Unpack
[58] Fix | Delete
* routines produce a C double from such a string. The suffix (4 or 8)
[59] Fix | Delete
* specifies the number of bytes in the string.
[60] Fix | Delete
*
[61] Fix | Delete
* On platforms that appear to use (see _PyFloat_Init()) IEEE-754 formats
[62] Fix | Delete
* these functions work by copying bits. On other platforms, the formats the
[63] Fix | Delete
* 4- byte format is identical to the IEEE-754 single precision format, and
[64] Fix | Delete
* the 8-byte format to the IEEE-754 double precision format, although the
[65] Fix | Delete
* packing of INFs and NaNs (if such things exist on the platform) isn't
[66] Fix | Delete
* handled correctly, and attempting to unpack a string containing an IEEE
[67] Fix | Delete
* INF or NaN will raise an exception.
[68] Fix | Delete
*
[69] Fix | Delete
* On non-IEEE platforms with more precision, or larger dynamic range, than
[70] Fix | Delete
* 754 supports, not all values can be packed; on non-IEEE platforms with less
[71] Fix | Delete
* precision, or smaller dynamic range, not all values can be unpacked. What
[72] Fix | Delete
* happens in such cases is partly accidental (alas).
[73] Fix | Delete
*/
[74] Fix | Delete
[75] Fix | Delete
/* The pack routines write 2, 4 or 8 bytes, starting at p. le is a bool
[76] Fix | Delete
* argument, true if you want the string in little-endian format (exponent
[77] Fix | Delete
* last, at p+1, p+3 or p+7), false if you want big-endian format (exponent
[78] Fix | Delete
* first, at p).
[79] Fix | Delete
* Return value: 0 if all is OK, -1 if error (and an exception is
[80] Fix | Delete
* set, most likely OverflowError).
[81] Fix | Delete
* There are two problems on non-IEEE platforms:
[82] Fix | Delete
* 1): What this does is undefined if x is a NaN or infinity.
[83] Fix | Delete
* 2): -0.0 and +0.0 produce the same string.
[84] Fix | Delete
*/
[85] Fix | Delete
PyAPI_FUNC(int) _PyFloat_Pack2(double x, unsigned char *p, int le);
[86] Fix | Delete
PyAPI_FUNC(int) _PyFloat_Pack4(double x, unsigned char *p, int le);
[87] Fix | Delete
PyAPI_FUNC(int) _PyFloat_Pack8(double x, unsigned char *p, int le);
[88] Fix | Delete
[89] Fix | Delete
/* Needed for the old way for marshal to store a floating point number.
[90] Fix | Delete
Returns the string length copied into p, -1 on error.
[91] Fix | Delete
*/
[92] Fix | Delete
PyAPI_FUNC(int) _PyFloat_Repr(double x, char *p, size_t len);
[93] Fix | Delete
[94] Fix | Delete
/* Used to get the important decimal digits of a double */
[95] Fix | Delete
PyAPI_FUNC(int) _PyFloat_Digits(char *buf, double v, int *signum);
[96] Fix | Delete
PyAPI_FUNC(void) _PyFloat_DigitsInit(void);
[97] Fix | Delete
[98] Fix | Delete
/* The unpack routines read 2, 4 or 8 bytes, starting at p. le is a bool
[99] Fix | Delete
* argument, true if the string is in little-endian format (exponent
[100] Fix | Delete
* last, at p+1, p+3 or p+7), false if big-endian (exponent first, at p).
[101] Fix | Delete
* Return value: The unpacked double. On error, this is -1.0 and
[102] Fix | Delete
* PyErr_Occurred() is true (and an exception is set, most likely
[103] Fix | Delete
* OverflowError). Note that on a non-IEEE platform this will refuse
[104] Fix | Delete
* to unpack a string that represents a NaN or infinity.
[105] Fix | Delete
*/
[106] Fix | Delete
PyAPI_FUNC(double) _PyFloat_Unpack2(const unsigned char *p, int le);
[107] Fix | Delete
PyAPI_FUNC(double) _PyFloat_Unpack4(const unsigned char *p, int le);
[108] Fix | Delete
PyAPI_FUNC(double) _PyFloat_Unpack8(const unsigned char *p, int le);
[109] Fix | Delete
[110] Fix | Delete
/* free list api */
[111] Fix | Delete
PyAPI_FUNC(int) PyFloat_ClearFreeList(void);
[112] Fix | Delete
[113] Fix | Delete
PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out);
[114] Fix | Delete
[115] Fix | Delete
/* Format the object based on the format_spec, as defined in PEP 3101
[116] Fix | Delete
(Advanced String Formatting). */
[117] Fix | Delete
PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter(
[118] Fix | Delete
_PyUnicodeWriter *writer,
[119] Fix | Delete
PyObject *obj,
[120] Fix | Delete
PyObject *format_spec,
[121] Fix | Delete
Py_ssize_t start,
[122] Fix | Delete
Py_ssize_t end);
[123] Fix | Delete
#endif /* Py_LIMITED_API */
[124] Fix | Delete
[125] Fix | Delete
#ifdef __cplusplus
[126] Fix | Delete
}
[127] Fix | Delete
#endif
[128] Fix | Delete
#endif /* !Py_FLOATOBJECT_H */
[129] Fix | Delete
[130] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function