freebsd-skq/lib/msun/ld128
kargl 8a978711f2 The value small=2**-(p+3), where p is the precision, can be determine from
lgamma(x) = -log(x) - log(1+x) + x*(1-g) + x**2*P(x) with g = 0.57...
being the Euler constant and P(x) a polynomial.  Substitution of small
into the RHS shows that the last 3 terms are negligible in comparison to
the leading term.  The choice of 3 may be conservative.

The value large=2**(p+3) is detemined from Stirling's approximation
lgamma(x) = x*(log(x)-1) - log(x)/2 + log(2*pi)/2 + P(1/x)/x
Again, substitution of large into the RHS reveals the last 3 terms
are negligible in comparison to the leading term.

Move the x=+-0 special case into the |x|<small block.

In the ld80 and ld128 implementaion, use fdlibm compatible comparisons
involving ix, lx, and llx.  This replaces several floating point
comparisons (some involving fabsl()) and also fixes the special cases
x=1 and x=2.

While here
  . Remove unnecessary parentheses.
  . Fix/improve comments due to the above changes.
  . Fix nearby whitespace.

* src/e_lgamma_r.c:
  . Sort declaration.
  . Remove unneeded explicit cast for type conversion.
  . Replace a double literal constant by an integer literal constant.

* src/e_lgammaf_r.c:
  . Sort declaration.

* ld128/e_lgammal_r.c:
  . Replace a long double literal constant by a double literal constant.

* ld80/e_lgammal_r.c:
  . Remove unused '#include float.h'
  . Replace a long double literal constant by a double literal constant.

Requested by:	bde
2014-10-09 22:39:52 +00:00
..
e_lgammal_r.c The value small=2**-(p+3), where p is the precision, can be determine from 2014-10-09 22:39:52 +00:00
e_rem_pio2l.h
invtrig.c
invtrig.h
k_cosl.c
k_expl.h * ld80/k_expl.h: 2013-12-30 00:51:25 +00:00
k_sinl.c
k_tanl.c
s_erfl.c * Makefile: 2014-07-13 17:05:03 +00:00
s_exp2l.c Fix some regressions caused by the switch from gcc to clang. The fixes 2013-05-27 08:50:10 +00:00
s_expl.c In lib/msun/ld128/s_expl.c, remove '/*' within block comment, to avoid a 2014-02-21 21:54:36 +00:00
s_logl.c Add logl, log2l, log10l, and log1pl. 2013-06-03 09:14:31 +00:00
s_nanl.c