This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/21400] Section "Infinity and NaN" of the libc manual
- From: "vincent-srcware at vinc17 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 24 Apr 2017 16:04:20 +0000
- Subject: [Bug manual/21400] Section "Infinity and NaN" of the libc manual
- Auto-submitted: auto-generated
- References: <bug-21400-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21400
--- Comment #6 from Vincent Lefèvre <vincent-srcware at vinc17 dot net> ---
(In reply to joseph@codesourcery.com from comment #5)
> Non-associativity would presumably apply equally to hypot:
> hypot(sNaN,hypot(qNaN,Inf)) is qNaN but hypot(hypot(sNaN,qNaN),Inf) is
> Inf. Of course the IEEE 754 hypot operation (corrected rounded) isn't
> strictly associative for finite arguments anyway.
In any case, Inf is a correct answer. I suppose that for min/max, one may
consider that sNaN does not mean "missing data", and a non-NaN result could be
regarded as incorrect after the second call. Moreover, AFAIK, the
non-associativity of min/max is an issue mainly for those who wanted to
implement a min/max reduction operation by a sequence of 2-ary min/max in the
context of parallelism and wanted reproducibility. But as you say, hypot is
already not associative for finite arguments (so that results would not be
reproducible).
--
You are receiving this mail because:
You are on the CC list for the bug.