Closed dplassgit closed 10 months ago
The sticking point is that Java (optimizer) by default includes a trailing .0
for "round" floats, but %g
never does. Ideally, we would include a trailing .0
so as to distinguish floats from ints when printing. (That's tracked in issue #273)
This is running into issues with printing doubles. The default Java to-string prints doubles nicely, e.g.,
3.0
and3.14159
but sprintf (clib) can only either print3
and3.14159
OR3.000000
and3.141590
. There's no "always include the decimal and at most one zero" option.