public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100561] New: Error while computing square of a real number (8 and 16 bytes)
@ 2021-05-12  8:53 h0bb_88 at protonmail dot com
  2021-05-12  8:58 ` [Bug fortran/100561] " h0bb_88 at protonmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: h0bb_88 at protonmail dot com @ 2021-05-12  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100561
           Summary: Error while computing square of a real number (8 and
                    16 bytes)
           Product: gcc
           Version: og10 (devel/omp/gcc-10)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: h0bb_88 at protonmail dot com
  Target Milestone: ---

This simple example didn't give the same result than wolfram or any calculator
:
- result from program : 9.869604950...
- result from other calculators : 9.869604401...

The rounding is not the cause, because of error from 10° decimal, in 16-byte
floating point. This error exist too in 8-byte floating-points number. 

Simple example :

program main
real(16), parameter :: pi =
3.1415926535897932384626433832795028841971693993751058209749445923
write(*,*) pi**2, pi*pi
end program

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

end of thread, other threads:[~2021-05-12  9:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12  8:53 [Bug fortran/100561] New: Error while computing square of a real number (8 and 16 bytes) h0bb_88 at protonmail dot com
2021-05-12  8:58 ` [Bug fortran/100561] " h0bb_88 at protonmail dot com
2021-05-12  8:59 ` h0bb_88 at protonmail dot com
2021-05-12  9:02 ` h0bb_88 at protonmail dot com
2021-05-12  9:54 ` rguenth at gcc dot gnu.org
2021-05-12  9:55 ` rguenth at gcc dot gnu.org
2021-05-12  9:56 ` pinskia 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).