At 22:51 20.08.2002, [EMAIL PROTECTED] wrote: >Hey, > >I think this is fairly ciritical... and suspect it has something to do >with marcus' new sprintf function. Marcus, can you have a look at it? > >Derick
Unfortuanetly spprintf is based on snprintf we took from apache. It seems that 'f' and 'g' are not C99 compliant. I have underlined the wrong part in the abstract. I will try to make it complient. marcus Abstract from ISO:IEC 9899:1999: f,F A double argument representing a floating-point number is converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is zero and the # flag is not specified, no decimal-point character appears. If a decimal-point character appears, at least one digit appears before it. The value is rounded to the appropriate number of digits. g,G A double argument representing a floating-point number is converted in style f or e (or in style F or E in the case of a G conversion specifier), with the precision specifying the number of significant digits. If the precision is zero, it is taken as 1. The style used depends on the value converted; style e (or E) is used only if the exponent resulting from such a conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional portion of the result unless the # flag is specified; a decimal-point character appears only if it is followed by a digit. A double argument representing an infinity or NaN is converted in the style of an f or F conversion specifier.