This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29335] transcendental functions with constant arguments should be resolved at compile-time
- From: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2006 03:14:21 -0000
- Subject: [Bug middle-end/29335] transcendental functions with constant arguments should be resolved at compile-time
- References: <bug-29335-578@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from ghazi at gcc dot gnu dot org 2006-10-31 03:14 -------
(In reply to comment #18)
> (In reply to comment #17)
> This is because MPFR defines
> lngamma as log(gamma(x)) while the C standard defines it as log|gamma(x)|. I
> wonder if this should be regarded as a bug or if a new function (say,
> mpfr_lgamma) should be defined in MPFR (in which case, not before 2.3.0). Do
> other standards (other languages) define such a function, either as
> log(gamma(x)) or as log|gamma(x)|?
As I think about it more, I'm leaning toward having a new function mpfr_lgamma.
This is because if we want this mpfr function to mimic the behavior of lgamma,
we need some mechanism to retrieve the value of "signgam". So maybe the
interface you suggested at the bottom of this link would be best where we
retrieve an int* from mpfr_lgamma to determine "signgam":
http://sympa.loria.fr/wwsympa/arc/mpfr/2006-10/msg00033.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29335