~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/dtoa.c

  • Committer: Monty Taylor
  • Date: 2008-09-22 23:53:43 UTC
  • mto: This revision was merged to the branch mainline in revision 417.
  • Revision ID: monty@inaugust.com-20080922235343-ihqvp6g9k1mtzxmc
Renamed max/min.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
    if (len <= decpt)
131
131
      *dst++= '.';
132
132
    
133
 
    for (i= precision - max(0, (len - decpt)); i > 0; i--)
 
133
    for (i= precision - cmax(0, (len - decpt)); i > 0; i--)
134
134
      *dst++= '0';
135
135
  }
136
136
  
219
219
  if (x < 0.)
220
220
    width--;
221
221
 
222
 
  res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : min(width, FLT_DIG),
 
222
  res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : cmin(width, FLT_DIG),
223
223
            &decpt, &sign, &end, buf, sizeof(buf));
224
224
  if (decpt == DTOA_OVERFLOW)
225
225
  {
2136
2136
          1 ==> like 0, but with Steele & White stopping rule;
2137
2137
                e.g. with IEEE P754 arithmetic , mode 0 gives
2138
2138
                1e23 whereas mode 1 gives 9.999999999999999e22.
2139
 
          2 ==> max(1,ndigits) significant digits.  This gives a
 
2139
          2 ==> cmax(1,ndigits) significant digits.  This gives a
2140
2140
                return value similar to that of ecvt, except
2141
2141
                that trailing zeros are suppressed.
2142
2142
          3 ==> through ndigits past the decimal point.  This