- CMP("2.342000e+02", "%e",2.342E+02);
- CMP("-2.3420e-02", "%10.4e",-2.342E-02);
- CMP("-2.3420e-02", "%11.4e",-2.342E-02);
- CMP(" -2.3420e-02", "%15.4e",-2.342E-02);
+ // NB: there are no standards about the minimum exponent width
+ // (and the width of the %e conversion specifier refers to the
+ // mantissa, not to the exponent).
+ // Since newer MSVC versions use 3 digits as minimum exponent
+ // width while GNU libc uses 2 digits as minimum width, here we
+ // workaround this problem using for the exponent values with at
+ // least three digits.
+ // Some examples:
+ // printf("%e",2.342E+02);
+ // -> under MSVC7.1 prints: 2.342000e+002
+ // -> under GNU libc 2.4 prints: 2.342000e+02
+ CMP("2.342000e+112", "%e",2.342E+112);
+ CMP("-2.3420e-112", "%10.4e",-2.342E-112);
+ CMP("-2.3420e-112", "%11.4e",-2.342E-112);
+ CMP(" -2.3420e-112", "%15.4e",-2.342E-112);