[RFC] libm replacement for Busybox
Roberto A. Foglietta
roberto.foglietta at gmail.com
Sun Oct 12 17:44:26 UTC 2008
2008/10/10 Loïc Grenié <loic.grenie at gmail.com>:
> They are neither very fast nor very precise (the
> trigonometric functions are awful, up to 16 bits are
> false) but libm is rather large and usually a user of
> Busybox on an initrd or embedded platform does not
> need neither speed nor excellent precision. Otherwise
> it would always be possible to disable them anyway.
How not very precise? You claim they are false after 16 bits but a
test of 100 runs of your "quick and dirty way" to check the precision
says:
for i in $(seq 100); do ./libmtest; for f in err*; do tail -1 $f |
sed "s/^/$f: /"|cut -f2 -d\: | cut -f1; done; done | tee pippo.txt
roberto at rafbook:/tmp$ sort -g pippo.txt | head -n1
-52.034560116350050407
roberto at rafbook:/tmp$ sort -g pippo.txt | tail -n1
-4
precision varies between 52 (very good) and 4 (very scarse) bits. Are
the these the correct meaning of log2 you had said before?
Cheers,
--
/roberto
More information about the busybox
mailing list