[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2012-05-05 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518 --- Comment #25 from Janne Blomqvist 2012-05-05 07:59:30 UTC --- Author: jb Date: Sat May 5 07:59:22 2012 New Revision: 187191 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187191 Log: PR 49010,24518 MOD/MODULO fixes. gcc/fortran: 201

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-12-02 Thread pinskia at gcc dot gnu dot org
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.1.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24518

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-12-02 Thread burnus at gcc dot gnu dot org
--- Comment #24 from burnus at gcc dot gnu dot org 2006-12-02 08:23 --- (In reply to comment #23) > Just to let you know that the Fortran compiler has been broken for about a > month on all Solaris versions (except release 10) with I just filled this as PR30048. -- http://gcc.gnu.o

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-12-02 Thread ebotcazou at gcc dot gnu dot org
--- Comment #23 from ebotcazou at gcc dot gnu dot org 2006-12-02 08:12 --- Just to let you know that the Fortran compiler has been broken for about a month on all Solaris versions (except release 10) with: Undefined first referenced symbol

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-11-30 Thread chaoyingfu at gcc dot gnu dot org
--- Comment #23 from chaoyingfu at gcc dot gnu dot org 2006-12-01 00:07 --- Subject: Bug 24518 Author: chaoyingfu Date: Fri Dec 1 00:05:26 2006 New Revision: 119383 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119383 Log: Merged revisions 118455-118543 via svnmerge from svn

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-11-10 Thread pault at gcc dot gnu dot org
--- Comment #22 from pault at gcc dot gnu dot org 2006-11-10 21:52 --- Subject: Bug 24518 Author: pault Date: Fri Nov 10 21:52:00 2006 New Revision: 118666 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118666 Log: 2006-11-10 Paul Thomas <[EMAIL PROTECTED]> Backport fro

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-11-05 Thread pault at gcc dot gnu dot org
--- Comment #21 from pault at gcc dot gnu dot org 2006-11-05 22:18 --- Fixed on trunk and 4.2 - will soon be fixed on 4.1. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added --

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-11-05 Thread pault at gcc dot gnu dot org
--- Comment #20 from pault at gcc dot gnu dot org 2006-11-05 08:46 --- Subject: Bug 24518 Author: pault Date: Sun Nov 5 08:46:02 2006 New Revision: 118493 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118493 Log: 2006-11-05 Francois-Xavier Coudert <[EMAIL PROTECTED],org>

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-11-04 Thread pault at gcc dot gnu dot org
--- Comment #19 from pault at gcc dot gnu dot org 2006-11-05 06:27 --- Subject: Bug 24518 Author: pault Date: Sun Nov 5 06:27:48 2006 New Revision: 118492 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118492 Log: 2006-11-05 Francois-Xavier Coudert <[EMAIL PROTECTED],org>

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-31 Thread paul dot richard dot thomas at cea dot fr
--- Comment #16 from paul dot richard dot thomas at cea dot fr 2006-10-31 16:14 --- Subject: RE: Intrinsic MOD incorrect for large arg1/arg2 and slow. FX, > > --- Comment #15 from fxcoudert at gcc dot gnu dot org > 2006-10-31 16:05 --- > (In reply to comment #14) > > It al

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-31 Thread pault at gcc dot gnu dot org
--- Comment #17 from pault at gcc dot gnu dot org 2006-10-31 16:21 --- The fortran version of Uros' #13: real(8) :: x real(8) :: t = 0.0 x = 1000.0 do while (x > 0.0) t = t + mod (x, 1.7e-8) x = x - 1.0 end do print *, t end Yields: $ /irun/bin/gfortran -O2 -ma

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-31 Thread fxcoudert at gcc dot gnu dot org
--- Comment #15 from fxcoudert at gcc dot gnu dot org 2006-10-31 16:05 --- (In reply to comment #14) > It also does MODULO correctly Why not use remainder{f,,l}? Is it incorrect? > although I am not sure that I understand why anybody > would use this intrinsic knowingly! Agreed :)

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-31 Thread pault at gcc dot gnu dot org
--- Comment #14 from pault at gcc dot gnu dot org 2006-10-31 15:56 --- Created an attachment (id=12518) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12518&action=view) A fix for the PR: FX and Uros, I believe that this correctly detects the presence of the built_in. It also doe

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-31 Thread fxcoudert at gcc dot gnu dot org
--- Comment #18 from fxcoudert at gcc dot gnu dot org 2006-10-31 16:46 --- (In reply to comment #16) > I understood that remainder (a, b) = a - round (a/b) * b, whereas > mod (a, b) = a - int (a/b) * b > and modulo (a, b) = a - floor (a/b) * b Right you

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-26 Thread uros at kss-loka dot si
--- Comment #13 from uros at kss-loka dot si 2006-10-26 22:22 --- Just some performance numbers (sorry for the C testcase...) on x86_64: --cut here-- #include #include int main() { double x; double t = 0.0; for (x = 1000.0; x > 0.0; x -= 1.0) t += fmod (x, 1.7e-8); p

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-26 Thread pault at gcc dot gnu dot org
--- Comment #12 from pault at gcc dot gnu dot org 2006-10-26 20:08 --- FX and Steve, I'll dig out my version of MOD and MODULO that uses the library call, if you like. The availability of the builtin can be tested and the existing call used, if not present. That I already did because

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-25 Thread sgk at troutmask dot apl dot washington dot edu
--- Comment #11 from sgk at troutmask dot apl dot washington dot edu 2006-10-26 04:03 --- Subject: Re: Intrinsic MOD incorrect for large arg1/arg2 and slow. On Wed, Oct 25, 2006 at 08:19:21AM -, fxcoudert at gcc dot gnu dot org wrote: > > I'm adding Steve Kargl to the CC list, si

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-25 Thread uros at kss-loka dot si
--- Comment #10 from uros at kss-loka dot si 2006-10-25 14:16 --- (In reply to comment #9) > > In the later case, expansion will fall-back to normal library call. > > OK. So on system where the math library doesn't have remainderl, for example, > we shouldn't use BUILT_IN_REMAINDERL or

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-25 Thread fxcoudert at gcc dot gnu dot org
--- Comment #9 from fxcoudert at gcc dot gnu dot org 2006-10-25 13:53 --- (In reply to comment #8) > In the later case, expansion will fall-back to normal library call. OK. So on system where the math library doesn't have remainderl, for example, we shouldn't use BUILT_IN_REMAINDERL or

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-25 Thread uros at kss-loka dot si
--- Comment #8 from uros at kss-loka dot si 2006-10-25 11:48 --- (In reply to comment #7) > Just to be sure I understand: we are garanteed that BUILT_IN_REMAINDER{F,,L} > and BUILT_IN_FMOD{F,,L} are always available, right? Yes. The expansion does not depend on -ffast-math anymore. How

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-25 Thread fxcoudert at gcc dot gnu dot org
--- Comment #7 from fxcoudert at gcc dot gnu dot org 2006-10-25 08:19 --- I'm adding Steve Kargl to the CC list, since he's our arithmetics expert :) (In reply to comment #6) > Revision 118024 clears the way for MOD and MODULO implementation: > http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-25 Thread uros at kss-loka dot si
--- Comment #6 from uros at kss-loka dot si 2006-10-25 07:33 --- Revision 118024 clears the way for MOD and MODULO implementation: http://gcc.gnu.org/ml/gcc-cvs/2006-10/msg00703.html BTW: I don't know fortran requirements, but built-in functions produce faster code if errno is not neede

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-22 Thread fxcoudert at gcc dot gnu dot org
--- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-10-23 06:19 --- Created an attachment (id=12477) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12477&action=view) Example patch I don't know if it's giving correct results in all cases, or if it works even on platforms wit

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-10-22 Thread fxcoudert at gcc dot gnu dot org
--- Comment #4 from fxcoudert at gcc dot gnu dot org 2006-10-22 21:01 --- Having thought about it some more, MODULO should be implemented using fmod{f,,l} and MOD should use remainder{f,,l}. See how BUILT_IN_POWL is used, for example, to emit the same kind of code in gfc_conv_intrinsic_

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-06-21 Thread paul dot richard dot thomas at cea dot fr
0 juin 2006 14:23 > À : THOMAS Paul Richard 169137 > Objet : [Bug fortran/24518] Intrinsic MOD incorrect for large > arg1/arg2 > and slow. > > > > > --- Comment #2 from fxcoudert at gcc dot gnu dot org > 2006-06-20 12:22 --- > Why exactly are

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2006-06-20 Thread fxcoudert at gcc dot gnu dot org
--- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-06-20 12:22 --- Why exactly aren't we using BUILT_IN_FMOD{F,,L}? $ cat a.f90 real*8 :: x = 10.0e9 do i = 10, 22 x = 10d0 * x print '(a,i2,a,g14.8," = ",g14.8)', "mod (10**",i,", 1.7_8) = ", &

[Bug fortran/24518] Intrinsic MOD incorrect for large arg1/arg2 and slow.

2005-10-25 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-25 14:37 --- Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC|