Movatterモバイル変換


[0]ホーム

URL:


Navigation

Floating Point Objects

PyFloatObject

This subtype ofPyObject represents a Python floating point object.

PyTypeObjectPyFloat_Type

This instance ofPyTypeObject represents the Python floating pointtype. This is the same object asfloat in the Python layer.

intPyFloat_Check(PyObject *p)

Return true if its argument is aPyFloatObject or a subtype ofPyFloatObject.

intPyFloat_CheckExact(PyObject *p)

Return true if its argument is aPyFloatObject, but not a subtype ofPyFloatObject.

PyObject*PyFloat_FromString(PyObject *str)
Return value: New reference.

Create aPyFloatObject object based on the string value instr, orNULL on failure.

PyObject*PyFloat_FromDouble(double v)
Return value: New reference.

Create aPyFloatObject object fromv, orNULL on failure.

doublePyFloat_AsDouble(PyObject *pyfloat)

Return a Cdouble representation of the contents ofpyfloat. Ifpyfloat is not a Python floating point object but has a__float__()method, this method will first be called to convertpyfloat into a float.This method returns-1.0 upon failure, so one should callPyErr_Occurred() to check for errors.

doublePyFloat_AS_DOUBLE(PyObject *pyfloat)

Return a Cdouble representation of the contents ofpyfloat, butwithout error checking.

PyObject*PyFloat_GetInfo(void)

Return a structseq instance which contains information about theprecision, minimum and maximum values of a float. It’s a thin wrapperaround the header filefloat.h.

doublePyFloat_GetMax()

Return the maximum representable finite floatDBL_MAX as Cdouble.

doublePyFloat_GetMin()

Return the minimum normalized positive floatDBL_MIN as Cdouble.

intPyFloat_ClearFreeList()

Clear the float free list. Return the number of items that could notbe freed.

Previous topic

Boolean Objects

Next topic

Complex Number Objects

This Page

Quick search

Enter search terms or a module, class or function name.

Navigation

©Copyright 1990-2017, Python Software Foundation.
The Python Software Foundation is a non-profit corporation.Please donate.
Last updated on Sep 19, 2017.Found a bug?
Created usingSphinx 1.2.

[8]ページ先頭

©2009-2025 Movatter.jp