https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #25 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Wed Mar 30 20:47:45 2016
New Revision: 234600
URL: https://gcc.gnu.org/viewcvs?rev=234600=gcc=rev
Log:
2016-03-30 Jerry DeLisle
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #24 from Jerry DeLisle ---
Dominiq, I have tested as much as I can with several variations of values of
the float and all looks good. I am ready to approve your patch when you are.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #23 from Jerry DeLisle ---
(In reply to Dominique d'Humieres from comment #22)
> Created attachment 38107 [details]
> New patch with test.
>
> With the patch we now get for y=6431.25
>
> ru,-8pf18.2 y= 0.01
>
> IMO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #22 from Dominique d'Humieres ---
Created attachment 38107
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38107=edit
New patch with test.
With the patch we now get for y=6431.25
ru,-8pf18.2 y= 0.01
IMO this is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #21 from Dominique d'Humieres ---
> Nice work!
Unfortunately not finished yet!-(
program fmt
implicit none
real*4 y
character(45) :: fmtstr
integer :: p,w,d
y = 643.125
d=2
w=18
do p=-8,7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #20 from Jerry DeLisle ---
(In reply to Dominique d'Humieres from comment #19)
> Created attachment 38100 [details]
> Another patch with correct rounding
>
> > While I think the handling of nafter < 0 is correct, it is probably
> >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #19 from Dominique d'Humieres ---
Created attachment 38100
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38100=edit
Another patch with correct rounding
> While I think the handling of nafter < 0 is correct, it is probably
> a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #18 from Dominique d'Humieres ---
Created attachment 38097
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38097=edit
Patch with correct rounding
With the attached patch I get the expected rounding
...
-6pf18.2 y=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #17 from Dominique d'Humieres ---
Created attachment 38092
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38092=edit
Updated patch "hiding" the problem reported in 16
With the attached patch I get
-8pf18.2 y=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #16 from Dominique d'Humieres ---
> Created attachment 38090 [details]
> Updated patch correcting problem found by Dominique
With this updated patch and y = 643.125 and d=2, I get
-8pf18.2 y= 1.00
-7pf18.2 y=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #15 from Jerry DeLisle ---
Created attachment 38091
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38091=edit
A more exhaustive testing program
This test allows at least visual inspection of the patterns. The test omits the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #14 from Jerry DeLisle ---
Created attachment 38090
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38090=edit
Updated patch correcting problem found by Dominique
This is what I came up with independent of Dominiques patch.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #13 from Dominique d'Humieres ---
Created attachment 38084
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38084=edit
A new patch for testing
With y = 1.0 and d=8 I now get
-8pf18.8 y=0.0001
-7pf18.8 y=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #12 from Jerry DeLisle ---
(In reply to Dominique d'Humieres from comment #11)
> > Created attachment 38075 [details]
> > A patch for testing
>
> With the patch and using the test attached to comment 5 with y = 1.0 and
> d=8, I get
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #11 from Dominique d'Humieres ---
> Created attachment 38075 [details]
> A patch for testing
With the patch and using the test attached to comment 5 with y = 1.0 and d=8, I
get the following output
-8pf18.8 y=0.000.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #10 from Jerry DeLisle ---
Created attachment 38075
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38075=edit
A patch for testing
Please test this patch as much as possible. I think I have it right, but one
can never tell so
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #8 from Jerry DeLisle ---
(In reply to Tobias Burnus from comment #7)
... snip ...
>
> My gut feeling is that it has something to do with having "precision" == 17
> in that function. In any case, the nafter is too large when nblanks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #5 from Jerry DeLisle ---
Created attachment 37990
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37990=edit
A useful test program
I get correct results using the attached with gcc version 4.6.4 (GCC)
Broken in 4.9, 5, and 6.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #7 from Tobias Burnus ---
(In reply to Jerry DeLisle from comment #4)
> I will get started on this one. Dominique, if you spot the problem let me
> know.
In determine_precision, one has:
int precision = f->u.real.d; // "3" as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #6 from Jerry DeLisle ---
*** Bug 70237 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #9 from Jerry DeLisle ---
I have isolated to a block of code which is dead relative to our current
testsuite. Now to work on the solution.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
Jerry DeLisle changed:
What|Removed |Added
CC||jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #3 from Antoine Gardeux ---
Thanks for the quick confirmation.
Since this kind of format is widely used in our code base, it would be very
tedious to change all the occurrences. Is there any other way to work around
this issue ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
--- Comment #2 from Dominique d'Humieres ---
> Related to pr702357.
Fat fingers;-( Read pr70237.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235
Dominique d'Humieres changed:
What|Removed |Added
Priority|P3 |P4
25 matches
Mail list logo