Objetos de Ponto Flutuante¶
-
PyTypeObject
PyFloat_Type¶ Esta instância do
PyTypeObjectrepresenta o tipo de ponto flutuante do Python. Este é o mesmo objetofloatna camada do Python.
-
int
PyFloat_Check(PyObject *p)¶ Retorna true se seu argumento é um
PyFloatObjectou um subtipo dePyFloatObject.
-
int
PyFloat_CheckExact(PyObject *p)¶ Retorna true se seu argumento é um
PyFloatObject, mas não um subtipo dePyFloatObject.
-
PyObject*
PyFloat_FromString(PyObject *str)¶ - Return value: New reference.
Create a
PyFloatObjectobject based on the string value in str, or NULL on failure.
-
PyObject*
PyFloat_FromDouble(double v)¶ - Return value: New reference.
Create a
PyFloatObjectobject from v, or NULL on failure.
-
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)¶ Retorna uma representação C
doubledo conteúdo de pyfloat, mas sem verificação de erro.
-
PyObject*
PyFloat_GetInfo(void)¶ Retorna uma instância de structseq que contém informações sobre a precisão, os valores mínimo e máximo de um ponto flutuante. É um wrapper fino em torno do arquivo de cabeçalho
float.h.
-
double
PyFloat_GetMax()¶ Retorna o ponto flutuante finito máximo representável DBL_MAX como
doubledo C.
-
double
PyFloat_GetMin()¶ Retorna o ponto flutuante positivo mínimo normalizado DBL_MIN como
doubledo C.
-
int
PyFloat_ClearFreeList()¶ Clear the float free list. Return the number of items that could not be freed.
