sprintf() precision arbitrarily at six decimal places?

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

Is there a reason the sprintf() precision is 6?

include std/console.e 
include std/text.e 
atom v = 0.442404149 
puts(1,"\n" & sprint(v)) 
puts(1,"\n" & sprintf("%f",{v})) 
printf(1,"\n%f",{v}) 

0.442404149 
0.442404 
0.442404 

Why?!?! This has caused much agony.

ADD: What's the best way to insure all decimal places are returned without going scientific notation for very-precise values?

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

Search



Quick Links

User menu

Not signed in.

Misc Menu