summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/s_fabs.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2010-12-05 22:11:03 +0000
committerdas <das@FreeBSD.org>2010-12-05 22:11:03 +0000
commit225ceb18e8a1729edd452bb883adfdb72d75c769 (patch)
tree194be6588ef6450b9c4dc71ae44ad99e14dec9ec /lib/msun/src/s_fabs.c
parentcec2e8182c77939ee3d4ff9ae865a9f36d437c57 (diff)
downloadFreeBSD-src-225ceb18e8a1729edd452bb883adfdb72d75c769.zip
FreeBSD-src-225ceb18e8a1729edd452bb883adfdb72d75c769.tar.gz
Add a "kernel" log function, based on e_log.c, which is useful for
implementing accurate logarithms in different bases. This is based on an approach bde coded up years ago. This function should always be inlined; it will be used in only a few places, and rudimentary tests show a 40% performance improvement in implementations of log2() and log10() on amd64. The kernel takes a reduced argument x and returns the same polynomial approximation as e_log.c, but omitting the low-order term. The low-order term is much larger than the rest of the approximation, so the caller of the kernel function can scale it to the appropriate base in extra precision and obtain a much more accurate answer than by using log(x)/log(b).
Diffstat (limited to 'lib/msun/src/s_fabs.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud