Objek Pecahan¶
-
PyTypeObject
PyFloat_Type¶ Instance dari
PyTypeObjectini mewakili tipe pecahan Python. Ini adalah objek yang sama denganfloatdi lapisan Python.
-
int
PyFloat_Check(PyObject *p)¶ Return true if its argument is a
PyFloatObjector a subtype ofPyFloatObject.
-
int
PyFloat_CheckExact(PyObject *p)¶ Return true if its argument is a
PyFloatObject, but not a subtype ofPyFloatObject.
-
PyObject*
PyFloat_FromString(PyObject *str)¶ - Return value: New reference.
Membuat objek
PyFloatObjectberdasarkan nilai string di str, atauNULLjika gagal.
-
PyObject*
PyFloat_FromDouble(double v)¶ - Return value: New reference.
Membuat objek
PyFloatObjectdari v, atauNULLjika gagal.
-
double
PyFloat_AsDouble(PyObject *pyfloat)¶ Return a C
doublerepresentation of the contents of pyfloat. If pyfloat is not a Python floating point object but has a__float__()method, this method will first be called to convert pyfloat into a float. This method returns-1.0upon failure, so one should callPyErr_Occurred()to check for errors.
-
double
PyFloat_AS_DOUBLE(PyObject *pyfloat)¶ Mengembalikan representasi C
doubledari konten pyfloat, tetapi tanpa pemeriksaan error.
-
PyObject*
PyFloat_GetInfo(void)¶ - Return value: New reference.
Mengembalikan instance structseq yang berisi informasi tentang presisi, nilai minimum dan maksimum float. Ini adalah pembungkus tipis di sekitar file header
float.h.
-
double
PyFloat_GetMax()¶ Mengembalikan float maksimum yang dapat direpresentasikan DBL_MAX sebagai C
double.
-
double
PyFloat_GetMin()¶ Mengembalikan float positif minimum yang dinormalisasi DBL_MIN sebagai C
double.
-
int
PyFloat_ClearFreeList()¶ Clear the float free list. Return the number of items that could not be freed.
