Exponent part in scientific notation

Jan 24, 2011 at 8:15pm
When I use %E for scientific notation, different result will be obtained if I use different compiler.
In windows (mingw), I got 3 digis in exponent part 1.600E+002
while in Linux (gcc), I got 2 digis in the exponent part 1.600E+02

How can I unify then use parameters. Thanks.
Jan 24, 2011 at 8:19pm
closed account (zb0S216C)
The result of a computation varies from compiler to compiler.
Jan 24, 2011 at 8:22pm
Dose it mean I have to write a self-defined function to got unified print results?
Jan 24, 2011 at 11:25pm
Why do you want them unified? What are you trying to do?
Jan 24, 2011 at 11:31pm
To generate a standard output file with X.XXXXXXE+XX (like 0.123456E+02) otherwise, the file may fail to recognized by other party.

Now I just avoid "%E", in stead, I got the coefficient and exponent of the double data, and print the coef and expo individually used %d. And now it works fine.
Topic archived. No new replies allowed.