complex division alogrithm?

Toon Moene toon@moene.indiv.nluug.nl
Fri May 7 20:41:00 GMT 2004


Paul Brook wrote:

> On Friday 07 May 2004 20:15, Toon Moene wrote:

>>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 ?

> We need to do constant folding in the frontend. Actual runtime division is 
> left for the GENERIC/GIMPLE to figure out.

Well, strictly speaking, we "do not have to do constant folding" in the 
frontend.  There's nothing in the Fortran Standard(s) that requires 
this.  We only want to do this because it is improves run times.

However, with the advent of Fortran 2003, we might get ourselves into 
trouble evaluating "compile time constant expressions" using a different 
floating point model than the run time one (i.e., the underlying - 
probably IEEE 754 conformant - CPU).

If you're interested, I can start up a discussion about this on the J3 
mailing list ...

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)



More information about the Fortran mailing list