sprintf() precision arbitrarily at six decimal places?
- Posted by euphoric (admin) Apr 29, 2019
- 1601 views
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?