[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: better float2str() C code, anyone?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 30 Nov 2004 08:26:28 -0200
> As part of my ARM-linux adaptation work (see other msg) I did the
> attached 'float2str()' code. It's a quickie, and I'd want to replace
> it with (a similar sized) tested & proven Open Source approach. But is
> there any?
Floating-point -> text conversion is not a light job. Of course, in your
application, you may be able to get away with simple code, but in general.
if you want to have reversible conversions, then there's a lot to do.
Having said that, a simple and small code for floating-point -> text conversion
would be ideal for Lua installations that don't or can't use libc.
Try http://www.netlib.org/fp/ for excellent-quality, but large, code.
(There's even some code by Rob Pike and Ken Thompson.)
--lhf