Subject: Re: syslog_r (Re: CVS commit: src/lib/libc)
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: David Laight <>
List: tech-userlevel
Date: 10/28/2006 11:54:20
On Sat, Oct 28, 2006 at 02:01:45AM -0400, der Mouse wrote:
> For floating point, you could do a stripped-down dtoa-alike that might
> not handle NaNs and infinities, or some such, but still basically works
> for "ordinary" numbers.

NaN and infinites should be easy.
Indeed fp convertions to short output fields shouldn't be hard.

Quite possibly the normal formatting code could optimise them.
Converting the number to its full precision, then throwing almost
all of it away in 99.99% of the cases [1] seems a waste of cpu cycle.


[1] I prsume this is what happens...

David Laight: