summaryrefslogtreecommitdiffstats
path: root/Include/floatobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/floatobject.h')
-rw-r--r--Include/floatobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/floatobject.h b/Include/floatobject.h
index 60ede40..6c11036 100644
--- a/Include/floatobject.h
+++ b/Include/floatobject.h
@@ -21,6 +21,12 @@ PyAPI_DATA(PyTypeObject) PyFloat_Type;
#define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type)
#define PyFloat_CheckExact(op) (Py_TYPE(op) == &PyFloat_Type)
+/* The str() precision PyFloat_STR_PRECISION is chosen so that in most cases,
+ the rounding noise created by various operations is suppressed, while
+ giving plenty of precision for practical use. */
+
+#define PyFloat_STR_PRECISION 12
+
#ifdef Py_NAN
#define Py_RETURN_NAN return PyFloat_FromDouble(Py_NAN)
#endif