public inbox for
help / color / mirror / Atom feed
Subject: ada/8925: Floating point code gives incorrect results
Date: Fri, 13 Dec 2002 05:16:00 -0000	[thread overview]
Message-ID: <> (raw)

>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
>Originator:     Steve Sangwine, University of Essex, UK
>Release:        gcc 3.2
Windows 2000
MinGW 2.0.0-3
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).
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.

Content-Type: text/plain; name="incorrect.txt"
Content-Disposition: inline; filename="incorrect.txt"

Enter phase:      180.0
Enter saturation: 1.0
Enter intensity:  0.5
Invalid_HSI_Coordinate raised
Raw values:           0-2147483648-2147483648
Enter phase:      ^C

             reply	other threads:[~2002-12-13 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-13  5:16 sjs [this message]
2003-05-13  0:06 Dara Hazeghi
2003-05-13  6:33 steven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).