http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #51 from Lionel GUEZ ebay.20.tedlap at spamgourmet dot com
2011-05-05 10:46:21 UTC ---
It is PR48787 and a patch has been submitted for approval. It is fixed on my
development trunk.
Hello. I do not understand: you say that there
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #50 from Lionel GUEZ ebay.20.tedlap at spamgourmet dot com
2011-05-05 10:42:31 UTC ---
Can you please provide a short example program, and what version of GFortran
you are using?
I cannot reproduce the described bug with GFortran
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #52 from jvdelisle at frontier dot com 2011-05-05 12:30:38 UTC ---
On 05/05/2011 04:01 AM, ebay.20.tedlap at spamgourmet dot com wrote:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #51 from Lionel GUEZebay.20.tedlap
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #53 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-05-05
12:35:46 UTC ---
The test:
print (1pg7.1), 0.96
end
Fails in 4.4 and works in 4.5, so this confirms it was fixed quite a while ago.
I strongly suggest you upgrade your
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
Jerry DeLisle jvdelisle at gcc dot gnu.org changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
Lionel GUEZ ebay.20.tedlap at spamgourmet dot com changed:
What|Removed |Added
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #49 from Thomas Henlich thenlich at users dot sourceforge.net
2011-05-04 12:48:28 UTC ---
(In reply to comment #47)
(In reply to comment #46)
I have started on the second phase of this effort which is to get rid of the
floating
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #48 from jvdelisle at frontier dot com 2011-05-04 12:30:59 UTC ---
On 05/04/2011 05:15 AM, ebay.20.tedlap at spamgourmet dot com wrote:
--- Comment #47 from Lionel GUEZebay.20.tedlap at spamgourmet dot com
2011-05-04 12:15:16 UTC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #46 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-05-02
12:46:11 UTC ---
I have started on the second phase of this effort which is to get rid of the
floating point issue on -m32 machines.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #44 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-29
14:56:07 UTC ---
Author: jvdelisle
Date: Fri Apr 29 14:56:02 2011
New Revision: 173166
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173166
Log:
2011-04-29 Jerry
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #45 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-29
15:09:02 UTC ---
Author: jvdelisle
Date: Fri Apr 29 15:08:57 2011
New Revision: 173168
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173168
Log:
2011-04-29 Jerry
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #43 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-23 11:44:45 UTC ---
It seems the required changes would fit in nicely in output_float():
We can treat FMT_G like FMT_E. After the rounding step, i.e. when the
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #40 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-21
12:44:54 UTC ---
Reply to comment #37
Using volatile does not fix the behavior for the if condition. I have tried
several volatile permutations on it as well. Using
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #41 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-21 16:36:14 UTC ---
Actually it may be even simpler than that:
We already know how many significant digits (d) we want in the output string,
and at what digit to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #42 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-21
19:09:24 UTC ---
Yes, I agree. My intuition was telling me our approach was wrong. I will try
to come up with a patch in the next few days. No rush please with Easter
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #37 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-20 06:43:37 UTC ---
The same issue exists with the first comparison (decision between FMT_E and
FMT_F).
Consider:
print (g35.25), 0.095d0 ! 0.95..11..E-01
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #38 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-20 12:38:53 UTC ---
As an alternative we might consider leaving the code as it was before and
instead putting
OUTPUT_FLOAT_FMT_G(4)
OUTPUT_FLOAT_FMT_G(8)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #39 from Tobias Burnus burnus at gcc dot gnu.org 2011-04-20
13:01:34 UTC ---
(In reply to comment #38)
and compile with -mpc32 -mpc64 -mpc80 respectively.
Then I like Janne's proposal more: compiling libgfortran/io/*.c with
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #31 from Tobias Burnus burnus at gcc dot gnu.org 2011-04-19
06:06:44 UTC ---
(In reply to comment #30)
I can not reproduce the issue with optimization issue on my linux system
x86-64.
I can produce it with -m32 on Linux. Most such
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #32 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-19 06:09:27 UTC ---
(In reply to comment #30)
I can not reproduce the issue with optimization issue on my linux system
x86-64.
Thomas, what platform do you see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #33 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-19
15:28:56 UTC ---
In response to Comment #30:
One solution seems to be to take away static inline for the function:
double calculate_exp(int d)
{
int i;
double r =
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #34 from Tobias Burnus burnus at gcc dot gnu.org 2011-04-19
16:22:16 UTC ---
(In reply to comment #33)
We could put that behind some compiler directives looking for -m32 or similar.
Try:
temp = calculate_exp(mid - 1)* (1 - r *
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #35 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-19
20:02:38 UTC ---
That does the trick. I will regression test and commit tonight
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #36 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-20
04:18:31 UTC ---
Author: jvdelisle
Date: Wed Apr 20 04:18:25 2011
New Revision: 172753
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=172753
Log:
2011-04-19 Jerry
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #23 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-18 05:59:55 UTC ---
Created attachment 24025
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24025
Updated test
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #22 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-18 05:59:14 UTC ---
(In reply to comment #7)
+ case ROUND_ZERO:\
+r = sign_bit ? 0.0 : 1.0;\
This should read:
r = sign_bit ? 1.0 : 0.0;\
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #24 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-18 06:32:06 UTC ---
call check_all(0.995_RT, 15, 2, 0)
This still fails (with RC,G15.2 /= RC,F11.1). We need to look at why.
I am aware that N=.995 is .994...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #26 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-18 08:40:12 UTC ---
Created attachment 24027
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24027
Test program for optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #25 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-18 08:39:17 UTC ---
After some testing, I found the problem to be optimization-related. It seems
the following term is calculated as a long double and not rounded
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
Mikael Morin mikael at gcc dot gnu.org changed:
What|Removed |Added
CC||mikael at gcc dot
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #28 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-18
18:46:00 UTC ---
This optimization test case is cute. We should ship it to the optimization
folks.
And it should be yet another PR, even if we can come up with a work
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #29 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-18
18:56:22 UTC ---
I should mention that optimization issue goes away at -O3.
It also goes away with -ffloat-store
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #30 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-19
02:06:52 UTC ---
I can not reproduce the issue with optimization issue on my linux system
x86-64.
Thomas, what platform do you see the problem on? I only see it on a
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #16 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-17
12:39:25 UTC ---
I see another rounding issue with this:
integer, parameter :: RT=8
print *, 0.09_RT, RD:
print (RD,G15.2), 0.09_RT
print (RD,E15.2),
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #17 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-17 13:25:25 UTC ---
(In reply to comment #16)
I see another rounding issue with this:
integer, parameter :: RT=8
print *, 0.09_RT, RD:
print
On 04/17/2011 06:25 AM, thenlich at users dot sourceforge.net wrote:
--- snip ---
I agree.
Let's open a new bug for this. This bug is about the correct choice of format,
not about rounding (this is somewhere else in the code).
Yes, new PR. We are using builtin snprintf for DTOA.
#define
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #18 from jvdelisle at frontier dot com 2011-04-17 13:47:06 UTC ---
On 04/17/2011 06:25 AM, thenlich at users dot sourceforge.net wrote:
--- snip ---
I agree.
Let's open a new bug for this. This bug is about the correct choice of
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #19 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-18
03:48:28 UTC ---
Author: jvdelisle
Date: Mon Apr 18 03:48:25 2011
New Revision: 172634
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=172634
Log:
2011-04-17 Jerry
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #20 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-18
03:53:02 UTC ---
Author: jvdelisle
Date: Mon Apr 18 03:52:59 2011
New Revision: 172635
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=172635
Log:
2011-04-17 Jerry
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #21 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-18
03:58:25 UTC ---
Fixed on trunk. Shall we close?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #8 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-16 06:42:52 UTC ---
(In reply to comment #7)
- if ((m 0.0 m 0.1 - 0.05 * rexp_d) || (rexp_d * (m + 0.5) = 1.0) ||\
+ if ((m 0.0 m 0.1 - r * rexp_d) ||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #9 from jvdelisle at frontier dot com 2011-04-16 14:38:23 UTC ---
On 04/15/2011 11:42 PM, thenlich at users dot sourceforge.net wrote:
m 0.1 - 0.1 * r * rexp_d
m 0.1 * (1.0 - r * rexp_d)
Of course. I am also testing with input
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #10 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-16 15:46:14 UTC ---
(In reply to comment #8)
(In reply to comment #7)
- if ((m 0.0 m 0.1 - 0.05 * rexp_d) || (rexp_d * (m + 0.5) = 1.0)
||\
+ if ((m
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #11 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-16
16:03:19 UTC ---
Created attachment 24011
-- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24011
Preliminary patch, still under testing
The attached is what I am
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #12 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-16
16:10:40 UTC ---
If 0 N 0.1 − r × 10−d−1 or N ≥ 10d − r, or N is identically 0 and d is 0,
Gw .d output editing is the same as k PEw .d output editing and Gw .d Ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #13 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-16
17:06:44 UTC ---
OK, here is what I have settled on for the IF clause after checking the
factoring.
rexp_d = calculate_exp_ ## x (-d);\
if ((m 0.0 m 0.1 - 0.1 * r
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #14 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-16 17:28:16 UTC ---
(In reply to comment #13)
OK, here is what I have settled on for the IF clause after checking the
factoring.
rexp_d = calculate_exp_ ## x
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #15 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-16 17:45:05 UTC ---
And maybe for performance improvement we should transform
if ((m 0.0 m 0.1 - 0.1 * r * rexp_d) || (rexp_d * (m + r) = 1.0) ||\
((m ==
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #2 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-15
19:31:06 UTC ---
I am missing something here:
print (RU,G15.2), .991d0
prints 1.00 but the expected result is 1.0 because 1 - r * 10**-2 .991 with r
= 1 because of UP
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #3 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-15 19:58:55 UTC ---
(In reply to comment #2)
I am missing something here:
print (RU,G15.2), .991d0
prints 1.00 but the expected result is 1.0 because 1 - r *
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #4 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-15
20:13:12 UTC ---
OK I knew I was looking at it wrong. The formulas you mention we are using
and are in write_float.def starting at line 798. The table is there as well. I
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #5 from Thomas Henlich thenlich at users dot sourceforge.net
2011-04-15 20:41:02 UTC ---
(In reply to comment #4)
OK I knew I was looking at it wrong. The formulas you mention we are using
and are in write_float.def starting at line
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #6 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-15
20:57:31 UTC ---
Ha, OK thanks. I see it.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
--- Comment #7 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-04-16
04:30:04 UTC ---
Here is a patch for testing.
Index: io/write_float.def
===
--- io/write_float.def
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48602
Jerry DeLisle jvdelisle at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
55 matches
Mail list logo