[ECOS] vfnprintf and floating point.

Jonathan Larmour jlarmour@cygnus.co.uk
Tue Oct 5 07:51:00 GMT 1999


Sergei Organov wrote:
> 
 
> I just tried to separate floating point code from 'vfnprintf'
> routine. It was surprisingly easy to do, but I remember that it didn't
> seem so easy for similar code found in 'newlib'. The code found in
> eCos libc is much better organized, but it seems that "Inf" and "NaN"
> processing was removed from the code entirely. What's the reason?

newlib uses the "mprec" library, which is more precise but substantially
larger. I decided to avoid it because of the extra restrictions imposed on
embedded systems. However, I do want to add configurability to this in
future so people can choose the implementation they want. It's just not
there right now.
 
> If you interested, I just changed first argument of 'cvt' from
> 'double' to 'va_list*', and moved double argument extraction to this
> routine. I also provided 'void skip_double(va_list*)' that is used to
> skip double argument when floating point support is disabled in
> 'vfnprintf'.

Since you've already done it, if you send me the patch (use `cvs diff -u5')
then I'll put it in. You are working from the anonymous CVS version, yes? 

Jifl
-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
 my brains kept falling out."    || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault


More information about the Ecos-discuss mailing list