Lines Matching refs:ndigit
69 static char * __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) /* {{{ */ in __cvt() argument
75 if (ndigit < 0) { in __cvt()
76 siz = -ndigit + 1; in __cvt()
78 siz = ndigit + 1; in __cvt()
85 if ((rve = s = (char *)malloc(ndigit?siz:2)) == NULL) { in __cvt()
90 if (!ndigit) { in __cvt()
94 p = zend_dtoa(value, fmode + 2, ndigit, decpt, sign, &rve); in __cvt()
128 static inline char *php_ecvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ in php_ecvt() argument
130 return(__cvt(value, ndigit, decpt, sign, 0, 1)); in php_ecvt()
134 static inline char *php_fcvt(double value, int ndigit, int *decpt, int *sign) /* {{{ */ in php_fcvt() argument
136 return(__cvt(value, ndigit, decpt, sign, 1, 1)); in php_fcvt()
140 PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf) /* {{{ */ in php_gcvt() argument
144 int mode = ndigit >= 0 ? 2 : 0; in php_gcvt()
147 ndigit = 17; in php_gcvt()
149 digits = zend_dtoa(value, mode, ndigit, &decpt, &sign, NULL); in php_gcvt()
155 …snprintf(buf, ndigit + 1, "%s%s", (sign && *digits == 'I') ? "-" : "", *digits == 'I' ? "INF" : "N… in php_gcvt()
165 if ((decpt >= 0 && decpt > ndigit) || decpt < -3) { /* use E-style */ in php_gcvt()