Logo
Explore Help
Sign In
1berry/cpython
1
0
Fork 0
You've already forked cpython
Code Issues Packages Projects Releases Wiki Activity
cpython/Include/dtoa.h

18 lines
368 B
C
Raw Normal View History

Merge branches/pep-0384.
2010-12-03 20:14:31 +00:00
#ifndef Py_LIMITED_API
Issue #1580: use short float repr where possible. - incorporate and adapt David Gay's dtoa and strtod into the Python core - on platforms where we can use Gay's code (almost all!), repr(float) is based on the shortest sequence of decimal digits that rounds correctly. - add sys.float_repr_style attribute to indicate whether we're using Gay's code or not - add autoconf magic to detect and enable SSE2 instructions on x86/gcc - slight change to repr and str: repr switches to exponential notation at 1e16 instead of 1e17, str switches at 1e11 instead of 1e12
2009-04-16 19:52:09 +00:00
#ifndef PY_NO_SHORT_FLOAT_REPR
#ifdef __cplusplus
extern "C" {
#endif
PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr);
PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits,
int *decpt, int *sign, char **rve);
PyAPI_FUNC(void) _Py_dg_freedtoa(char *s);
#ifdef __cplusplus
}
#endif
#endif
Merge branches/pep-0384.
2010-12-03 20:14:31 +00:00
#endif
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 805ms Template: 8ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API