DragonFly commits List (threaded) for 2007-06
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/lib/libm/src e_log.c e_logf.c
pavalos 2007/06/23 22:17:51 PDT
DragonFly src repository
Modified files:
lib/libm/src e_log.c e_logf.c
Log:
From FreeBSD:
Fixed the threshold for using the simple Taylor approximation.
In e_log.c, there was just a off-by-1 (1 ulp) error in the comment
about the threshold. The precision of the threshold is unimportant,
but the magic numbers in the code are easier to understand when the
threshold is described precisely.
In e_logf.c, mistranslation of the magic numbers gave an off-by-1
(1 * 16 ulps) error in the intended negative bound for the threshold
and an off-by-7 (7 * 16 ulps) error in the intended positive bound for
the threshold, and the intended bounds were not translated from the
double precision bounds so they were unnecessarily small by a factor
of about 2048.
The optimization of using the simple Taylor approximation for args
near a power of 2 is dubious since it only applies to a relatively
small proportion of args, but if it is done then doing it 2048 times
as often _may_ be more efficient. (My benchmarks show unexplained
dependencies on the data that increase with further optimizations
in this area.)
Revision Changes Path
1.2 +1 -1 src/lib/libm/src/e_log.c
1.2 +1 -1 src/lib/libm/src/e_logf.c
http://www.dragonflybsd.org/cvsweb/src/lib/libm/src/e_log.c.diff?r1=1.1&r2=1.2&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libm/src/e_logf.c.diff?r1=1.1&r2=1.2&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]