Skip to content
Tcl Source Code View Ticket
Login

View Ticket

inconsistent [format %e] output

Open2666369fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-03-05 22:50:58
On Windows:

(win) 1 % format %e 3.11341234
3.113412e+000

On Linux:

% format %e 3.11341234
3.113412e+00

According to the docs:

e or E    Convert  number to scientific notation in the form x.yyye±zz, ...

The Windows results has one too many
digits in the exponent part.

This gets in the way of attempts
to construct filenames from floating
point values in a way that is consistent
across platforms.
msofer Ticket [2666369fff]: 1 change [History diff]2009-05-01 06:32:31
Log in (anonymous is fine) to add a comment.