From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113311 invoked by alias); 23 Apr 2015 01:31:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 113224 invoked by uid 48); 23 Apr 2015 01:31:26 -0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libquadmath/65757] gfortran gives incorrect result for anint with real*16 argument Date: Thu, 23 Apr 2015 01:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libquadmath X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg01965.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65757 --- Comment #6 from Jerry DeLisle --- I am thinking its not working, but maybe I do not understand the function. I created a loop like this (with the patch): q1 = 233181505644407.99999999999999999999q0 q2 = anint (q1) q3 = 233181505644408.00000000000000000000q0 do i=1,1000 q1=q1+.02400039q0 q2=anint(q1) write (6, '(f50.25)') q1, q2 write (6, '(z35)') q1, q2 end do Scrolling through the results, I spot this: 233181505644431.7363857099999999995104932 233181505644431.5000000000000000000000000 402EA827999FCF1F79078C3B622BC417 402EA827999FCF1F0000000000000000