This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/30694] minval/maxval with +/-Inf
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2007 07:38:25 -0000
- Subject: [Bug libfortran/30694] minval/maxval with +/-Inf
- References: <bug-30694-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from fxcoudert at gcc dot gnu dot org 2007-10-18 07:38 -------
(In reply to comment #24)
> So maybe approach the question differently. Which element in an array of NaNs
> is the smallest one and what is its value? If I pick any one element, its
> "value" is NaN. It does not matter which one I select, its "value" always
> comes out NaN.
I understand your argument, but there are other arguments that are, I think, at
least equally valid and convincing. As I said, MINVAL basically ignores NaNs,
so an array containing only NaNs is equivalent to an empty array: its MINVAL is
+Huge. Note that having MINVAL = +Huge is, in itself, a telltale sign that
something is wrong, if there is no mask present.
Now, I have another question: what happens for mixed NaNs? For example, in your
scheme, what would be the value of MAXVAL((/sNaN, qNaN/))?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30694