alexei / sprintf.js

sprintf.js is a complete open source JavaScript sprintf implementation
BSD 3-Clause "New" or "Revised" License
2.11k stars 291 forks source link

g specifier doesn't work correctly #152

Open daurnimator opened 7 years ago

daurnimator commented 7 years ago

In C, 0.000001 gets rendered as 1e-6, whereas in sprintf.js it renders as '0.000001'

require("sprintf-js").sprintf("%.14g", 0.000001)