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, fortran] PR24518 and PR24520 - Improvements to MOD andDOT_PRODUCT


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


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