We should use MPFR to evaluate c99 lgamma function (and the common extension function gamma). However we have to wait until MPFR implements a suitable interface as described here:
http://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/TODO?root=mpfr&rev=4214&r1=4205&r2=4214 -- Summary: Evaluate lgamma/gamma at compile-time Product: gcc Version: unknown Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: middle-end AssignedTo: ghazi at gcc dot gnu dot org ReportedBy: ghazi at gcc dot gnu dot org BugsThisDependsOn: 29335 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30250