From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24039 invoked by alias); 13 Dec 2002 13:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24016 invoked by uid 71); 13 Dec 2002 13:16:01 -0000 Resent-Date: 13 Dec 2002 13:16:01 -0000 Resent-Message-ID: <20021213131601.24015.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, sjs@essex.ac.uk Received: (qmail 23415 invoked by uid 61); 13 Dec 2002 13:15:02 -0000 Message-Id: <20021213131502.23414.qmail@sources.redhat.com> Date: Fri, 13 Dec 2002 05:16:00 -0000 From: sjs@essex.ac.uk Reply-To: sjs@essex.ac.uk To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: ada/8925: Floating point code gives incorrect results X-SW-Source: 2002-12/txt/msg00746.txt.bz2 List-Id: >Number: 8925 >Category: ada >Synopsis: Floating point code gives incorrect results >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Dec 13 05:16:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Steve Sangwine, University of Essex, UK >Release: gcc 3.2 >Organization: >Environment: Windows 2000 MinGW 2.0.0-3 >Description: The code attached contains a test program and part of a library of code which works correctly with Gnat 3.15p and previous versions of Gnat. When compiled with gcc 3.2 this code gives incorrect numerical results (integer values output are never changed from -infinity, as they should be). >How-To-Repeat: Compile the main program rgb_conversions_test.adb. NB I have reported a fault with gnatchop, which on my system fails to chop the source code file which I have attached. Run the program rgb_conversions_test and at the prompts enter 180.0 for phase, 1.0 for saturation and 0.5 for intensity. The output that I get is shown in the file incorrect.txt. When compiled with Gnat 3.15p the same code gives the results shown in the file correct.txt. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="incorrect.txt" Content-Disposition: inline; filename="incorrect.txt" D:\Ada\Creake\Test>rgb_conversion_test Enter phase: 180.0 Enter saturation: 1.0 Enter intensity: 0.5 Invalid_HSI_Coordinate raised Raw values: 0-2147483648-2147483648 Enter phase: ^C D:\Ada\Creake\Test>