[racket] number formatting

From: Jos Koot (jos.koot at telefonica.net)
Date: Thu Aug 25 04:26:09 EDT 2011

(display-dollars-and-cents -987654321.6969697)
output:
($987,654,321.69)

How about rounding to:
  
($987,654,321.70)?

Did you have a look into (require (planet "fmt.rkt" ("joskoot"
"planet-fmt.plt" 1 9)))
Documentation is on planet as an msword .doc file.
I know I should scribble it, but I am not a handy scribbler.
Apart from several numerical formats, it also provides tabulation and
alignment such as to put numbers nicely aligned in the columns of a table.

Jos


-----Original Message-----
From: users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org]
On Behalf Of Neil Van Dyke
Sent: miércoles, 24 de agosto de 2011 23:26
To: Racket Users List
Subject: [racket] number formatting

How to format numbers prettily, such as for financial work, has come up 
a few times before.

I finally released a number formatting library that I've been using for 
many years.  If you use it, be sure to pay attention to the warnings in 
the documentation.

http://www.neilvandyke.org/racket-numformat/

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users




Posted on the users mailing list.