[Patch, fortran] PR24518 and PR24520 - Improvements to MOD and DOT_PRODUCT
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Thu Nov 10 18:52:00 GMT 2005
Paul Thomas wrote:
> 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/24518
> * trans-intrinsic.c (gfc_conv_intrinsic_mod): Correct broken bit of code
> that produces out of range results for large values of the quotient of
> the two arguments.
>
> PR fortran/24520
> * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): New function to
> implement dot_product inline.
> (gfc_conv_intrinsic_function): Change call from library dot_product to
> inline version.
I'm wondering, why are you promoting the arguments in to double precision in
your mod implementation? This will introduce double rounding problems (which
I'm not too worried about, as Fortran is only guaranteeing an approximation to
the mathematical value) and cut off precision in the REAL*10 or REAL*16 case.
I'm also wondering, why you are unconditionally using the library version of
DOT_PROD for kinds > 8.
- Tobi
More information about the Fortran
mailing list