Eduardo Cavazos wrote:
Is this a bug with fmt? It seems to happen with the 'fmt' in both
xitomatl and spells.
> (import (xitomatl fmt))
> (fmt #t (num 0.000004 10 8) nl)
0.000003A0
> (import (spells fmt))
> (fmt #t (num 0.000004 10 8) nl)
0.000003A0
>
Side note... the main reason I'm using 'fmt' in this particular case is
to print out numbers with a certain precision.
As you can see, implementations have different default printing behaviour:
Ikarus Scheme version 0.0.4-rc1+ (revision 1854, build 2009-09-15)
Copyright (c) 2006-2009 Abdulaziz Ghuloum
> 0.01
1e-2
>
Ypsilon 0.9.6-trunk/r503 Copyright (c) 2009 Y.Fujita, LittleWing Company
Limited.
> 0.01
0.01
>
I don't mind using fmt; it's a nice package. But just curious; is there
a more light-weight way to portably print numbers with a certain
precision? In my case, I just need to print decimal numbers with about 5
places of precision.
Ed