----- Original Message -----
From: "Jan van Oosterwijk" <[log in to unmask]>
>
> Q = a / b
> R = mod(a, b) ! How is this implemented ?
>
>
> I suppose it is too late now to put this into F200?
> But library-writers are free to add it, isn't it?
Many compilers optimize that already on architectures which are able to
produce both results with one operation. I've seen C compilers which
applied CSE to a/b and a%b but failed to produce in-line code for div()
unless it was replaced by the programmer as an in-line function. Many
Fortran compilers would continue to rely on the machinery provided by a
companion C compiler, so I doubt such a change in the language definition
would make any difference in end results. If the SPEC benchmark results
depended on such an optimization, it would get it right away. If it's
important enough, we could start a game to find out which current Fortrans
treat this in the desired way.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|