This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Integrate gfortran with MPC


From: "Steve Kargl" <sgk@troutmask.apl.washington.edu>

BTW, once mpc becomes mandatory, I plan to change gfc_expr as follows:

troutmask:sgk[225] diff -u gfortran.h.orig gfortran.h
--- gfortran.h.orig     2009-05-26 10:06:24.000000000 -0700
+++ gfortran.h  2009-05-26 10:09:03.000000000 -0700
@@ -1613,11 +1613,7 @@

mpfr_t real;

-    struct
-    {
-      mpfr_t r, i;
-    }
-    complex;
+    mpc_t complex;

    struct
    {

which of course leads to a large amount of changes in at
least arith.c, simplify.c, and few of the trans-*.c files.
The ultimate goal is not only the better accuracy provided
by mpc, but a code reduction.

That sounds like an excellent idea. BTW, I wish the other frontends and middle-end used mpfr_t/mpc_t for floating point. It would make fixing folding bugs a lot easier.


--Kaveh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]