Skip to content

Instantly share code, notes, and snippets.

@sebgod
Created June 30, 2014 18:29
Show Gist options
  • Save sebgod/3a0a47948e385516b7d3 to your computer and use it in GitHub Desktop.
Save sebgod/3a0a47948e385516b7d3 to your computer and use it in GitHub Desktop.
:- module fmt_bug.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module float.
:- import_module list.
:- import_module string.
main(!IO) :-
string.format("%6.3g\n", [f(16.0)], Message),
io.write_string(Message, !IO).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment