public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pvoytas at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/99740] floating point exception in rand() in gfortran Date: Thu, 25 Mar 2021 12:52:53 +0000 [thread overview] Message-ID: <bug-99740-4-EdrqcALS8x@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99740-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99740 --- Comment #3 from Paul A. Voytas <pvoytas at gmail dot com> --- I see what you mean--if i test for rand(0)=0.d0 I do get hist with gfortran on the EL7 machine. But it seems like there must still be something different from older versions. The info pages for rand() say "between 0 and 1" which I always took to be exclusive of the endpoints (of course there's machine precision). On CentOS6 with g77 when I run the above code I get no errors--even with 10x more attempts--and the test for rand(0)=0.d0 never is true. On that same CentOS6 machine with gfortran, code does show rand(0)=0.d0 cases (and the -log(rand(0)) returns +Infinity.
next prev parent reply other threads:[~2021-03-25 12:52 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-23 21:03 [Bug libfortran/99740] New: " pvoytas at gmail dot com 2021-03-23 21:59 ` [Bug libfortran/99740] " anlauf at gcc dot gnu.org 2021-03-23 22:02 ` kargl at gcc dot gnu.org 2021-03-25 12:52 ` pvoytas at gmail dot com [this message] 2021-03-25 17:17 ` sgk at troutmask dot apl.washington.edu 2021-03-29 14:43 ` pvoytas at gmail 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-99740-4-EdrqcALS8x@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).