[racket] Formatted output of floating-point numbers?

From: Grant Rettke (grettke at acm.org)
Date: Thu Jan 12 10:29:00 EST 2012

http://synthcode.com/scheme/fmt

There is a Planet package for it right on the page.

On Thu, Jan 12, 2012 at 4:53 AM, Dmitry Pavlov <dpavlov at ipa.nw.ru> wrote:
> 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,
>
> Dmitry
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



-- 
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE



Posted on the users mailing list.