On Jun 30, 2009, at 10:34 AM, Ramana Kumar wrote:
Dear Ikarus Users Does anyone know of a Scheme tool for formatting numbers with the following (or similar) abilities: [...]
I don't.
I can hack together a function to do whatever I want with a number, but I'm wondering whether this work has already been done...
Hacking it is probably less-than-ideal and would prove harder than doing it right from the first place. I suggest you start with the code from ``Printing Floating-Point Numbers Quickly and Accurately'' http://www.cs.indiana.edu/~burger/FP-Printing-PLDI96.pdf and use it to give you the raw digits and exponents that you can then trivially manipulate to make any output you want. You may find the procedure "flonum->string" in <ikarus>/scheme/ikarus.numerics.ss useful since it's closer to R6RS than the original code. I will help if you get stuck, since I was going to do this at some point anyways. Aziz,,,
