This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Use mpc_pow in the fortran frontend
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: Tobias Burnus <burnus at net-b dot de>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Jul 2009 17:44:52 -0700
- Subject: Re: [PATCH]: Use mpc_pow in the fortran frontend
- References: <Pine.GSO.4.58.0906270909250.2271@caipclassic.rutgers.edu> <4A463C06.4070300@net-b.de> <5FB644CBAB754D119AD498AC02560906@glap>
On Thu, Jul 02, 2009 at 10:24:11AM -0700, Kaveh R. Ghazi wrote:
> From: "Tobias Burnus" <burnus@net-b.de>
>
> >PS: For those not following the MPC development, missing (C99/F2008)
> >functions are mpc_acos, mpc_asin, mpc_atan, mpc_acosh, mpc_asinh,
> >mpc_atanh. And MPFR misses (F2008) SCALED_ERFC. The implementation of
> >all of those is planned; the inverse complex trigonometric/hyperbolic
> >function will (hopefully) happen in the next few months.
>
> The "arc" functions haven't been written yet in MPC, but as you say, they
> are planned (soon).
>
> However what is the status of csinh/ccosh/ctanh and ctan in fortran? These
> are currently available in MPC and could be added right now if the rest of
> the necessary infrastructure was put in place in the fortran frontend. I
> believe C99 fallback implementations are included in
> libgfortran/intrinsics/c99_functions.c, so that shouldn't be a blocker.
>
Kaveh,
Fortran does not define the complex versions of sinh/cosh/tanh
(didn't check for tan) until the draft for Fortran 2008. A quick
inspection of intrinsics.c suggests that gfortran currently doesn't
support these functions. Adding the basic support would be fairly
straight forward, but it will require fallback implementations of
of the functions for the runtime library.
--
Steve