"Ramana Kumar" wrote:
> Does anyone  know of a Scheme tool  for formatting numbers
> with the following (or similar) abilities:

You can try the  (format) library in Nausicaa/Scheme.  It is
incomplete, it  is a development  revision, and it  has some
problems here and there, but  it is working and you can take
it as a starting point.  It is written for LIMY Schemes, but
I am sure you can easily take the bits needed to make it run
with Ikarus from a single library file.

  Go here:

    <http://github.com/marcomaggi/nausicaa/tree/master>

and browse the repository to get:

* scheme/src/libraries/format.sls

  The library itself.

* scheme/src/libraries/nausicaa.ikarus.sls

  The language under which (format) has been written.

* scheme/src/libraries/nausicaa/common.sls

  A base library for (nausicaa).

* scheme/tests/test-format-lib.sps
* scheme/tests/test-format-round.sps

  The  main  test  file   and  a  test  file  for  auxiliary
  functions.

* scheme/doc/nausicaa-scheme.texi

  A big slab of documentation  in Texinfo format.  In it the
  node "format" documents the  (format) library.  IIRC it is
  out of sync  with the library in some  bits, but mostly up
  to date.

* scheme/infrastructure/gpl-3.0.texiinc
* scheme/infrastructure/fdl-1.3.texiinc

  Licence  files  included  by "nausicaa-scheme.texi".   You
  need them  only if  you want to  compile the  Texinfo file
  into HTML or Info or whatever.

  The bits you have to  take out of (nausicaa) and (nausicaa
common) are  support for parameters,  pretty-print, IIRC the
extensions  of  finite?, infinite?   and  nan?  for  complex
numbers (but I am not sure of these), and stuff like that.

  I  already   decided  that  I  will   make  (format)  more
independent from (nausicaa) and  that I will change its ugly
interface, but I cannot do it in the near future.

HTH
-- 
Marco Maggi

Reply via email to