This very small PR addresses an issue Ulli brought up: in trace diagrams, floating-point numbers often overflow their boxes. He is using a trace diagram generated by Metaprob in his slides, so wanted this cleaned up.
This PR achieves this by using (format "%f" ...), which truncates its output, if the value being rendered is a float, and using (pr-str ...) (as we did before) otherwise.
This very small PR addresses an issue Ulli brought up: in trace diagrams, floating-point numbers often overflow their boxes. He is using a trace diagram generated by Metaprob in his slides, so wanted this cleaned up.
This PR achieves this by using
(format "%f" ...)
, which truncates its output, if the value being rendered is a float, and using(pr-str ...)
(as we did before) otherwise.