public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up
@ 2010-08-28 15:27 Tobias Burnus
  2010-08-28 16:41 ` Steve Kargl
  2010-08-31  7:03 ` H.J. Lu
  0 siblings, 2 replies; 6+ messages in thread
From: Tobias Burnus @ 2010-08-28 15:27 UTC (permalink / raw)
  To: gcc patches, gfortran

[-- Attachment #1: Type: text/plain, Size: 47 bytes --]

  Committed as obvious. (Rev. 163615).

Tobias

[-- Attachment #2: commit.diff --]
[-- Type: text/x-patch, Size: 3011 bytes --]

Index: testsuite/ChangeLog
===================================================================
--- testsuite/ChangeLog	(Revision 163613)
+++ testsuite/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2010-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
+	    Tobias Burnus  <burnus@net-b.de>
+
+	* gfortran.dg/bessel_7.f90: Decrease required precision.
+
 2010-08-27  Naveen H.S  <naveen.S@kpitcummins.com>
 	    Kaz Kojima  <kkojima@gcc.gnu.org>
 
Index: testsuite/gfortran.dg/bessel_7.f90
===================================================================
--- testsuite/gfortran.dg/bessel_7.f90	(Revision 163613)
+++ testsuite/gfortran.dg/bessel_7.f90	(Arbeitskopie)
@@ -8,7 +8,7 @@
 implicit none
 real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78] 
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
-                  * [2, 3, 3, 5, 7, 2, 12, 4, 7, 3, 30, 168 ]
+                  * [2, 3, 4, 5, 7, 2, 12, 4, 7, 6, 30, 168 ]
 ! The following is sufficient for me - the values above are a bit
 ! more tolerant
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
@@ -19,7 +19,7 @@ real :: rec(0:Nmax), lib(0:Nmax)
 integer :: i
 
 do i = 1, ubound(values,dim=1)
-  call compare(values(i), myeps(i), nit(i), 3*epsilon(0.0))
+  call compare(values(i), myeps(i), nit(i), 6*epsilon(0.0))
 end do
 
 contains
Index: fortran/ChangeLog
===================================================================
--- fortran/ChangeLog	(Revision 163613)
+++ fortran/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2010-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+	* simplify.c (gfc_simplify_bessel_n2): Fix indention
+	and argument type.
+
 2010-08-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
 	PR fortran/45436
Index: fortran/simplify.c
===================================================================
--- fortran/simplify.c	(Revision 163613)
+++ fortran/simplify.c	(Arbeitskopie)
@@ -1241,7 +1241,7 @@ gfc_simplify_bessel_n2 (gfc_expr *order1
       if (jn && n1 == 0)
 	{
 	  e = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where);
-	  mpfr_set_ui (e->value.real, 1.0, GFC_RND_MODE);
+	  mpfr_set_ui (e->value.real, 1, GFC_RND_MODE);
 	  gfc_constructor_append_expr (&result->value.constructor, e,
 				       &x->where);
 	  n1++;
@@ -1251,7 +1251,7 @@ gfc_simplify_bessel_n2 (gfc_expr *order1
 	{
 	  e = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where);
 	  if (jn)
-	    mpfr_set_ui (e->value.real, 0.0, GFC_RND_MODE);
+	    mpfr_set_ui (e->value.real, 0, GFC_RND_MODE);
 	  else
 	    mpfr_set_inf (e->value.real, -1);
 	  gfc_constructor_append_expr (&result->value.constructor, e,
@@ -1315,7 +1315,7 @@ gfc_simplify_bessel_n2 (gfc_expr *order1
       return &gfc_bad_expr;
     }
   if (jn)
-     gfc_constructor_insert_expr (&result->value.constructor, e, &x->where, -2);
+    gfc_constructor_insert_expr (&result->value.constructor, e, &x->where, -2);
   else 
     gfc_constructor_append_expr (&result->value.constructor, e, &x->where);
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up
  2010-08-28 15:27 [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up Tobias Burnus
@ 2010-08-28 16:41 ` Steve Kargl
  2010-08-31  7:03 ` H.J. Lu
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Kargl @ 2010-08-28 16:41 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: gcc patches, gfortran

On Sat, Aug 28, 2010 at 04:29:01PM +0200, Tobias Burnus wrote:
>  Committed as obvious. (Rev. 163615).
> 

Thanks.

-- 
Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up
  2010-08-28 15:27 [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up Tobias Burnus
  2010-08-28 16:41 ` Steve Kargl
@ 2010-08-31  7:03 ` H.J. Lu
  2010-09-02 20:06   ` Tobias Burnus
  1 sibling, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2010-08-31  7:03 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: gcc patches, gfortran

On Sat, Aug 28, 2010 at 7:29 AM, Tobias Burnus <burnus@net-b.de> wrote:
>  Committed as obvious. (Rev. 163615).
>

I still got

http://gcc.gnu.org/ml/gcc-testresults/2010-08/msg03035.html:

FAIL: gfortran.dg/bessel_7.f90  -O0  execution test
FAIL: gfortran.dg/bessel_7.f90  -O1  execution test
FAIL: gfortran.dg/bessel_7.f90  -O2  execution test
FAIL: gfortran.dg/bessel_7.f90  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/bessel_7.f90  -O3 -fomit-frame-pointer
-funroll-loops  execution test
FAIL: gfortran.dg/bessel_7.f90  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/bessel_7.f90  -O3 -g  execution test
FAIL: gfortran.dg/bessel_7.f90  -Os  execution test



-- 
H.J.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up
  2010-08-31  7:03 ` H.J. Lu
@ 2010-09-02 20:06   ` Tobias Burnus
  2010-09-02 21:07     ` H.J. Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Tobias Burnus @ 2010-09-02 20:06 UTC (permalink / raw)
  To: H.J. Lu; +Cc: gcc patches, gfortran

  H.J. Lu wrote:
> I still got
> http://gcc.gnu.org/ml/gcc-testresults/2010-08/msg03035.html:
>
> FAIL: gfortran.dg/bessel_7.f90  -O0  execution test

As written before: Can you uncomment the print lines (all!) in bessel_7 
- and comment the if/abort lines? That gives a long output, but one can 
use it to find the values for which it fails.

Thanks!

Tobias

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up
  2010-09-02 20:06   ` Tobias Burnus
@ 2010-09-02 21:07     ` H.J. Lu
  2010-09-05 19:56       ` Tobias Burnus
  0 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2010-09-02 21:07 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: gcc patches, gfortran

On Thu, Sep 2, 2010 at 12:53 PM, Tobias Burnus <burnus@net-b.de> wrote:
>  H.J. Lu wrote:
>>
>> I still got
>> http://gcc.gnu.org/ml/gcc-testresults/2010-08/msg03035.html:
>>
>> FAIL: gfortran.dg/bessel_7.f90  -O0  execution test
>
> As written before: Can you uncomment the print lines (all!) in bessel_7 -
> and comment the if/abort lines? That gives a long output, but one can use it
> to find the values for which it fails.
>
> Thanks!
>
> Tobias
>

I got

 YN for X =    0.0000000      -- Epsilon =   1.19209290E-07
 YN for X =   0.50000000      -- Epsilon =   1.19209290E-07
 YN for X =    1.0000000      -- Epsilon =   1.19209290E-07
 YN for X =   0.89999998      -- Epsilon =   1.19209290E-07
 YN for X =    1.8000000      -- Epsilon =   1.19209290E-07
33 -0.277982435E+37 -0.277982181E+37   -0.25E+31  7.6507163048  T  F
34 -0.101848647E+39 -0.101848556E+39   -0.91E+32  7.5173835754  T  F
 YN for X =    2.0000000      -- Epsilon =   1.19209290E-07
 YN for X =    3.0000000      -- Epsilon =   1.19209290E-07
 YN for X =    4.0000000      -- Epsilon =   1.19209290E-07
41 -0.130542104E+36 -0.130542174E+36    0.69E+29 -4.4547867775  T  F
42 -0.266956917E+37 -0.266957075E+37    0.16E+31 -4.9791855812  T  F
43 -0.559304076E+38 -0.559304431E+38    0.35E+32 -5.3235278130  T  F
 YN for X =    4.2500000      -- Epsilon =   1.19209290E-07
 YN for X =    8.0000000      -- Epsilon =   1.19209290E-07
 YN for X =    34.529999      -- Epsilon =   1.19209290E-07
 YN for X =    475.78000      -- Epsilon =   1.19209290E-07


-- 
H.J.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up
  2010-09-02 21:07     ` H.J. Lu
@ 2010-09-05 19:56       ` Tobias Burnus
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Burnus @ 2010-09-05 19:56 UTC (permalink / raw)
  To: H.J. Lu; +Cc: gcc patches, gfortran

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

  H.J. Lu wrote:
>>> FAIL: gfortran.dg/bessel_7.f90  -O0  execution test
> I got

Thanks for the output. I have now committed the attached patch as Rev. 
163880.

Tobias

[-- Attachment #2: commit.diff --]
[-- Type: text/x-patch, Size: 1069 bytes --]

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 163879)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@
+2010-09-05  Tobias Burnus  <burnus@net-b.de>
+
+	* gfortran.dg/bessel_7.f90: Decrease required precision.
+
 2010-09-05  Hans-Peter Nilsson  <hp@axis.com>
 
 	PR testsuite/45545
Index: gcc/testsuite/gfortran.dg/bessel_7.f90
===================================================================
--- gcc/testsuite/gfortran.dg/bessel_7.f90	(Revision 163879)
+++ gcc/testsuite/gfortran.dg/bessel_7.f90	(Arbeitskopie)
@@ -8,7 +8,7 @@
 implicit none
 real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78] 
 real,parameter :: myeps(size(values)) = epsilon(0.0) &
-                  * [2, 3, 4, 5, 7, 2, 12, 4, 7, 6, 30, 168 ]
+                  * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 30, 168 ]
 ! The following is sufficient for me - the values above are a bit
 ! more tolerant
 !                  * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-05 19:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-28 15:27 [Patch,Fortran,committed] bessel_7.f90 decrease precision, simplify.c - minor clean up Tobias Burnus
2010-08-28 16:41 ` Steve Kargl
2010-08-31  7:03 ` H.J. Lu
2010-09-02 20:06   ` Tobias Burnus
2010-09-02 21:07     ` H.J. Lu
2010-09-05 19:56       ` Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).