public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dewi dot daniels at silver-software dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/29462] New: Sign ignored on fixed point multiplication Date: Fri, 13 Oct 2006 17:43:00 -0000 [thread overview] Message-ID: <bug-29462-12922@http.gcc.gnu.org/bugzilla/> (raw) The sign seems to be ignored when multiplying a named number with a fixed point value. Converting the named number to a fixed point type seems to work around the problem. See the example below: with Ada.Text_IO; procedure Test is type T is delta 0.1 range -1.0 .. 1.0; X : constant := -1.0; Y : T; package T_IO is new Ada.Text_IO.Fixed_IO (T); begin Ada.Text_IO.Put ("X = "); T_IO.Put (X); Ada.Text_IO.New_Line; Y := -1.0; Ada.Text_IO.Put ("Y = "); T_IO.Put (Y); Ada.Text_IO.New_Line; Ada.Text_IO.Put ("X * Y = "); T_IO.Put (X * Y); Ada.Text_IO.New_Line; Ada.Text_IO.Put ("T (X) * Y = "); T_IO.Put (T (X) * Y); Ada.Text_IO.New_Line; end Test; -- Summary: Sign ignored on fixed point multiplication Product: gcc Version: 3.4.5 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dewi dot daniels at silver-software dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29462
next reply other threads:[~2006-10-13 17:43 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-10-13 17:43 dewi dot daniels at silver-software dot com [this message] 2006-10-13 21:34 ` [Bug ada/29462] " laurent at guerby dot net 2007-05-02 12:21 ` charlet at gcc dot gnu dot org 2007-05-02 14:48 ` dewi dot daniels at silver-software dot com
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: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29462-12922@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe 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).