This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: complex division alogrithm?


On Fri, May 07, 2004 at 09:15:24PM +0200, Toon Moene wrote:
> Steve Kargl wrote:
> 
> [ Implement complex division like it is currently implemented in the
>   RTL expanders ]
> 
> >I haven't had time to implement a f2c-like algorithm, but I
> >should be able to get it this weekend.
> 
> Are you sure we have to do this in the Fortran frontend ?  Can't we just 
> hand complex division as a GENERIC expression to be expanded by GIMPLE ?
> 

program a
  complex z
  z = (1,9)/(7,6)
end program

The frontend will reduce the above division.  Tobi finally answered my
question.  GMP is initialized to use 130 bits during compilition.  If
I understand David Goldberg's paper correctly, then this is sufficient
for the naive complex division algorithm in gfc_arith_divide() to yield
the correct result.

I started to look at how we are handling complex types because LAPACK
test programs are failing for these types.

-- 
Steve


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