public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104483] New: Multiplication of huge and small numbers
@ 2022-02-10  9:37 shaydin at ktu dot edu.tr
  2022-02-10  9:43 ` [Bug fortran/104483] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: shaydin at ktu dot edu.tr @ 2022-02-10  9:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104483

            Bug ID: 104483
           Summary: Multiplication of huge and small numbers
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shaydin at ktu dot edu.tr
  Target Milestone: ---

Created attachment 52402
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52402&action=edit
Simple Fortran Code

As in the attached file, I am testing the multiplication of very large and
small decimal placed numbers for different real kinds. But the results are
different and the most strange point is the decimal part is lost for the quad
(real*16) version. I want to learn what is the problem and where is my mistake.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/104483] Multiplication of huge and small numbers
  2022-02-10  9:37 [Bug fortran/104483] New: Multiplication of huge and small numbers shaydin at ktu dot edu.tr
@ 2022-02-10  9:43 ` pinskia at gcc dot gnu.org
  2022-02-10 10:04 ` shaydin at ktu dot edu.tr
  2022-02-10 10:11 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-10  9:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104483

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

Basically floating point has a fixed precision so multiplying will cause
truncation due to that.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/104483] Multiplication of huge and small numbers
  2022-02-10  9:37 [Bug fortran/104483] New: Multiplication of huge and small numbers shaydin at ktu dot edu.tr
  2022-02-10  9:43 ` [Bug fortran/104483] " pinskia at gcc dot gnu.org
@ 2022-02-10 10:04 ` shaydin at ktu dot edu.tr
  2022-02-10 10:11 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: shaydin at ktu dot edu.tr @ 2022-02-10 10:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104483

--- Comment #2 from Prof.Dr. Selçuk Han AYDIN <shaydin at ktu dot edu.tr> ---
In this case, non of the precision gives correct answer when compared with
wxMaxima, Maple, Mathematica or some other wide range precision calculator. Is
there any solution for the fortran side.
Best regards

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/104483] Multiplication of huge and small numbers
  2022-02-10  9:37 [Bug fortran/104483] New: Multiplication of huge and small numbers shaydin at ktu dot edu.tr
  2022-02-10  9:43 ` [Bug fortran/104483] " pinskia at gcc dot gnu.org
  2022-02-10 10:04 ` shaydin at ktu dot edu.tr
@ 2022-02-10 10:11 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-10 10:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104483

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Prof.Dr. Selçuk Han AYDIN from comment #2)
> In this case, non of the precision gives correct answer when compared with
> wxMaxima, Maple, Mathematica or some other wide range precision calculator.
> Is there any solution for the fortran side.

No.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-10 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  9:37 [Bug fortran/104483] New: Multiplication of huge and small numbers shaydin at ktu dot edu.tr
2022-02-10  9:43 ` [Bug fortran/104483] " pinskia at gcc dot gnu.org
2022-02-10 10:04 ` shaydin at ktu dot edu.tr
2022-02-10 10:11 ` rguenth at gcc dot gnu.org

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).