Lines Matching refs:ndigit
71 static char * __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) /* {{{ */ in __cvt() argument
77 if (ndigit < 0) { in __cvt()
78 siz = -ndigit + 1; in __cvt()
80 siz = ndigit + 1; in __cvt()
87 if ((rve = s = (char *)malloc(ndigit?siz:2)) == NULL) { in __cvt()
92 if (!ndigit) { in __cvt()
96 p = zend_dtoa(value, fmode + 2, ndigit, decpt, sign, &rve); in __cvt()
130 static inline char *php_ecvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ in php_ecvt() argument
132 return(__cvt(value, ndigit, decpt, sign, 0, 1)); in php_ecvt()
136 static inline char *php_fcvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ in php_fcvt() argument
138 return(__cvt(value, ndigit, decpt, sign, 1, 1)); in php_fcvt()
142 PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf) /* {{{ */ in php_gcvt() argument
146 int mode = ndigit >= 0 ? 2 : 0; in php_gcvt()
149 ndigit = 17; in php_gcvt()
151 digits = zend_dtoa(value, mode, ndigit, &decpt, &sign, NULL); in php_gcvt()
157 …snprintf(buf, ndigit + 1, "%s%s", (sign && *digits == 'I') ? "-" : "", *digits == 'I' ? "INF" : "N… in php_gcvt()
167 if ((decpt >= 0 && decpt > ndigit) || decpt < -3) { /* use E-style */ in php_gcvt()