lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> 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 for excellent-quality, but large, code.
(There's even some code by Rob Pike and Ken Thompson.)