[racket] Formatted output of floating-point numbers?

From: Dmitry Pavlov (dpavlov at ipa.nw.ru)
Date: Thu Jan 12 05:53:15 EST 2012

Hello all,

I have been looking for a way to do in Racket
something you can easily do in C:

printf("%10.5lf\n", 12.345678);

so it properly cuts the fractional part to 5 digits
and adds padding to get 10 characters in total,
producing "  12.34568" as a result.

Best regards,


Posted on the users mailing list.