Home
last modified time | relevance | path

Searched refs:ndigits (Results 1 – 21 of 21) sorted by relevance

/device/linaro/bootloader/edk2/StdLib/LibC/gdtoa/
Dgdtoa.h121 extern char* dtoa ANSI((double d, int mode, int ndigits, int *decpt,
123 extern char* hdtoa ANSI((double d, const char *xdigs, int ndigits, int *decpt,
125 extern char* ldtoa ANSI((long double *ld, int mode, int ndigits, int *decpt,
127 extern char* hldtoa ANSI((long double e, const char *xdigs, int ndigits,
131 int mode, int ndigits, int *decpt, char **rve));
Dldtoa.c56 ldtoa(long double *ld, int mode, int ndigits, int *decpt, int *sign, char **rve) in ldtoa() argument
106 ret = gdtoa(&fpi, be, (ULong *)bits, &kind, mode, ndigits, decpt, rve); in ldtoa()
111 return dtoa((double)*ld, mode, ndigits, decpt, sign, rve); in ldtoa()
Ddtoa.c87 (d, mode, ndigits, decpt, sign, rve) in dtoa() argument
88 double d; int mode, ndigits, *decpt, *sign; char **rve; in dtoa()
90 (double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
308 ndigits = 0;
314 if (ndigits <= 0)
315 ndigits = 1;
316 ilim = ilim1 = i = ndigits;
322 i = ndigits + k + 1;
444 if (ndigits < 0 && ilim <= 0) {
622 k = -1 - ndigits;
Dgdtoa.c131 (FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve) in gdtoa() argument
309 ndigits = 0; in gdtoa()
315 if (ndigits <= 0) in gdtoa()
316 ndigits = 1; in gdtoa()
317 ilim = ilim1 = i = ndigits; in gdtoa()
323 i = ndigits + k + 1; in gdtoa()
464 if (ndigits < 0 && ilim <= 0) { in gdtoa()
638 k = -1 - ndigits; in gdtoa()
Dgdtoaimp.h562 extern char *dtoa (double d, int mode, int ndigits,
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Objects/
Dfloatobject.c1083 _Py_double_round(double x, int ndigits) { in _Py_double_round() argument
1093 if (ndigits == 0) { in _Py_double_round()
1139 if (val == -ndigits-1) { in _Py_double_round()
1140 if (ndigits >= 0) in _Py_double_round()
1142 else if (ndigits >= -FIVE_POW_LIMIT) { in _Py_double_round()
1145 for (i=0; i < -ndigits; i++) in _Py_double_round()
1157 buf = _Py_dg_dtoa(x, 3, ndigits+halfway_case, &decpt, &sign, &buf_end); in _Py_double_round()
1172 assert(buflen - decpt == ndigits+1); in _Py_double_round()
1227 _Py_double_round(double x, int ndigits) { in _Py_double_round() argument
1229 if (ndigits >= 0) { in _Py_double_round()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Objects/
Dfloatobject.c1082 _Py_double_round(double x, int ndigits) { in _Py_double_round() argument
1128 if (val == -ndigits-1) { in _Py_double_round()
1129 if (ndigits >= 0) in _Py_double_round()
1131 else if (ndigits >= -FIVE_POW_LIMIT) { in _Py_double_round()
1134 for (i=0; i < -ndigits; i++) in _Py_double_round()
1145 buf = _Py_dg_dtoa(x, 3, ndigits+halfway_case, &decpt, &sign, &buf_end); in _Py_double_round()
1159 assert(buflen - decpt == ndigits+1); in _Py_double_round()
1212 _Py_double_round(double x, int ndigits) { in _Py_double_round() argument
1214 if (ndigits >= 0) { in _Py_double_round()
1215 if (ndigits > 22) { in _Py_double_round()
[all …]
Dlongobject.c122 int ndigits = 0; in PyLong_FromLong() local
142 ++ndigits; in PyLong_FromLong()
145 v = _PyLong_New(ndigits); in PyLong_FromLong()
148 v->ob_size = negative ? -ndigits : ndigits; in PyLong_FromLong()
165 int ndigits = 0; in PyLong_FromUnsignedLong() local
170 ++ndigits; in PyLong_FromUnsignedLong()
173 v = _PyLong_New(ndigits); in PyLong_FromUnsignedLong()
176 Py_SIZE(v) = ndigits; in PyLong_FromUnsignedLong()
494 Py_ssize_t ndigits; in _PyLong_NumBits() local
498 ndigits = ABS(Py_SIZE(v)); in _PyLong_NumBits()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/PyMod-2.7.2/Objects/
Dlongobject.c122 int ndigits = 0; in PyLong_FromLong() local
142 ++ndigits; in PyLong_FromLong()
145 v = _PyLong_New(ndigits); in PyLong_FromLong()
148 v->ob_size = negative ? -ndigits : ndigits; in PyLong_FromLong()
165 int ndigits = 0; in PyLong_FromUnsignedLong() local
170 ++ndigits; in PyLong_FromUnsignedLong()
173 v = _PyLong_New(ndigits); in PyLong_FromUnsignedLong()
176 Py_SIZE(v) = ndigits; in PyLong_FromUnsignedLong()
494 Py_ssize_t ndigits; in _PyLong_NumBits() local
498 ndigits = ABS(Py_SIZE(v)); in _PyLong_NumBits()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Objects/
Dlongobject.c118 int ndigits = 0; in PyLong_FromLong() local
138 ++ndigits; in PyLong_FromLong()
141 v = _PyLong_New(ndigits); in PyLong_FromLong()
144 v->ob_size = negative ? -ndigits : ndigits; in PyLong_FromLong()
161 int ndigits = 0; in PyLong_FromUnsignedLong() local
166 ++ndigits; in PyLong_FromUnsignedLong()
169 v = _PyLong_New(ndigits); in PyLong_FromUnsignedLong()
172 Py_SIZE(v) = ndigits; in PyLong_FromUnsignedLong()
508 Py_ssize_t ndigits; in _PyLong_NumBits() local
512 ndigits = ABS(Py_SIZE(v)); in _PyLong_NumBits()
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Include/
Ddtoa.h7 PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits,
Dfloatobject.h133 PyAPI_FUNC(PyObject *) _Py_double_round(double x, int ndigits);
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Include/
Ddtoa.h7 PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits,
Dfloatobject.h133 PyAPI_FUNC(PyObject *) _Py_double_round(double x, int ndigits);
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Python/
Ddtoa.c1518 size_t ndigits, fraclen; in _Py_dg_strtod() local
1548 ndigits = s - s1; in _Py_dg_strtod()
1554 if (!ndigits) { in _Py_dg_strtod()
1565 ndigits += s - s1; in _Py_dg_strtod()
1572 if (!ndigits && !lz) { in _Py_dg_strtod()
1580 if (ndigits > MAX_DIGITS || fraclen > MAX_DIGITS) { in _Py_dg_strtod()
1585 nd = (int)ndigits; in _Py_dg_strtod()
1586 nd0 = (int)ndigits - (int)fraclen; in _Py_dg_strtod()
2345 _Py_dg_dtoa(double dd, int mode, int ndigits, in _Py_dg_dtoa() argument
2513 ndigits = 0; in _Py_dg_dtoa()
[all …]
Dbltinmodule.c2168 Py_ssize_t ndigits; in builtin_round() local
2177 ndigits = 0; in builtin_round()
2181 ndigits = PyNumber_AsSsize_t(o_ndigits, NULL); in builtin_round()
2182 if (ndigits == -1 && PyErr_Occurred()) in builtin_round()
2195 if (ndigits > NDIGITS_MAX) in builtin_round()
2198 else if (ndigits < NDIGITS_MIN) in builtin_round()
2204 return _Py_double_round(x, (int)ndigits); in builtin_round()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_long.py90 def getran(self, ndigits): argument
91 self.assertTrue(ndigits > 0)
92 nbits_hi = ndigits * SHIFT
114 def getran2(ndigits): argument
116 for i in xrange(ndigits):
Dtest_builtin.py1339 self.assertEqual(round(number=-8.0, ndigits=-1), -10.0)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/
Ddtoa.c2314 _Py_dg_dtoa(double dd, int mode, int ndigits, in _Py_dg_dtoa() argument
2482 ndigits = 0; in _Py_dg_dtoa()
2488 if (ndigits <= 0) in _Py_dg_dtoa()
2489 ndigits = 1; in _Py_dg_dtoa()
2490 ilim = ilim1 = i = ndigits; in _Py_dg_dtoa()
2496 i = ndigits + k + 1; in _Py_dg_dtoa()
2611 if (ndigits < 0 && ilim <= 0) { in _Py_dg_dtoa()
2748 k = -1 - ndigits; in _Py_dg_dtoa()
Dbltinmodule.c2157 Py_ssize_t ndigits; in builtin_round() local
2166 ndigits = 0; in builtin_round()
2170 ndigits = PyNumber_AsSsize_t(o_ndigits, NULL); in builtin_round()
2171 if (ndigits == -1 && PyErr_Occurred()) in builtin_round()
2184 if (ndigits > NDIGITS_MAX) in builtin_round()
2187 else if (ndigits < NDIGITS_MIN) in builtin_round()
2193 return _Py_double_round(x, (int)ndigits); in builtin_round()
/device/linaro/bootloader/edk2/StdLib/LibC/Stdio/
Dvfwprintf.c1972 cvt(double value, int ndigits, int flags, char *sign, int *decpt, int ch, in cvt() argument
1990 ndigits++; in cvt()
1995 digits = __dtoa(value, mode, ndigits, decpt, &dsgn, &rve); in cvt()
2004 bp = digits + ndigits; in cvt()
2007 *decpt = -ndigits + 1; in cvt()