Re: Phix 1.0.2 uploaded

new topic     » goto parent     » topic index » view thread      » older message » newer message

This is such a minor issue that I honestly do not know if it's worth bothering anyone with it — please ignore if it's not.

In Phix, printf() and sprintf() slightly misbehave with the "%1.nE" format: values of mE-n are printed with an additional zero when m is 1 and n > 10. This is independent of how many digits are specified in the format string, with a value of 1 there is always one zero too many:

atom a
a = 1e-11 
printf(1, "%1.6e\n", a) 
a = 1.234e-11 
printf(1, "%1.6e\n", a) 
 
1.0000000e-11 
1.234000e-11

(This does not happen in Euphoria)

It gave me a little trouble when I wrote a sprint12() function, which does exactly what sprint() does but with 12 instead of 10 digits (in case anyone is interested, I can post it — with minor modifications it also works with Euphoria) — but, as I've said, it is certainly a minor issue.

Robert

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu