Objetos de punto flotante¶
-
PyTypeObject
PyFloat_Type¶ - Part of the Stable ABI.
Esta instancia de
PyTypeObjectrepresenta el tipo de punto flotante de Python. Este es el mismo objeto quefloaten la capa de Python.
-
int
PyFloat_Check(PyObject *p)¶ Retorna verdadero si su argumento es un
PyFloatObjecto un subtipo dePyFloatObject. Esta función siempre finaliza con éxito.
-
int
PyFloat_CheckExact(PyObject *p)¶ Retorna verdadero si su argumento es un
PyFloatObject, pero no un subtipo dePyFloatObject. Esta función siempre finaliza con éxito.
-
PyObject *
PyFloat_FromString(PyObject *str)¶ - Return value: New reference. Part of the Stable ABI.
Crea un objeto
PyFloatObjecten función del valor de cadena de caracteres en str oNULLen caso de error.
-
PyObject *
PyFloat_FromDouble(double v)¶ - Return value: New reference. Part of the Stable ABI.
Crea un objeto
PyFloatObjecta partir de v, oNULLen caso de error.
-
double
PyFloat_AsDouble(PyObject *pyfloat)¶ - Part of the Stable ABI.
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. If__float__()is not defined then it falls back to__index__(). This method returns-1.0upon failure, so one should callPyErr_Occurred()to check for errors.Distinto en la versión 3.8: Utilice
__index__()si está disponible.
-
double
PyFloat_AS_DOUBLE(PyObject *pyfloat)¶ Return a C
doublerepresentation of the contents of pyfloat, but without error checking.
-
PyObject *
PyFloat_GetInfo(void)¶ - Return value: New reference. Part of the Stable ABI.
Retorna una instancia de structseq que contiene información sobre la precisión, los valores mínimos y máximos de un flotante. Es una envoltura delgada alrededor del archivo de encabezado
float.h.
-
double
PyFloat_GetMax()¶ - Part of the Stable ABI.
Return the maximum representable finite float DBL_MAX as C
double.
-
double
PyFloat_GetMin()¶ - Part of the Stable ABI.
Return the minimum normalized positive float DBL_MIN as C
double.