fdim NaN guard.
C99 math: lgamma and tgamma emulations.