150 if(lgx < 0.0) lgx = 0.1;
151 len = (int)ceil(lgx);
152 len += precision + 2;
156 if(precision == 0) precision = -1;
157 else precision *= -1;
162 if((precision != 0) && (precision < -1*(maxlen-5)))
163 precision = -1*(maxlen-5);
167 sprintf(fmt,
"%%.%dlf",precision);
171 precision =
ABS(precision);
172 sprintf(fmt,
"%%.%dle",precision);
176 sprintf(str,
"%d",(
int)(x+0.5));
201 if((ptr = strchr(str,
'.'))!=
NULL)
204 for(i=0; *ptr; ptr++, i++);
208 for( ; i<precision; i++) *ptr++ =
'0';
215 for(ptr = str; *ptr; ptr++);
219 for(i=0; i<precision; i++) *ptr++ =
'0';
225 if(str[strlen(str)-1] ==
'.') str[strlen(str)-1] =
'\0';
242 sscanf(str,
"%lf",&val);
243 if(val == 0.0 && str[0] ==
'-')
char * blFtostr(char *str, int maxlen, REAL x, int precision)
System-type variable type definitions.
Type definitions for maths.