Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35856

Re: Fwd: Re: double == double

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Fwd: Re: double == double
Date Thu, 20 Oct 2016 15:37:33 -0400
Organization A noiseless patient Spider
Lines 36
Message-ID <nub6da$4vd$1@dont-email.me> (permalink)
References <nu8nek$mbu$2@dont-email.me> <87insmj18o.fsf@golem.phantasia.org>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 20 Oct 2016 19:37:14 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="b5561b4a5add466f374a3df0735fe9f2"; logging-data="5101"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jLOihjOKeNR2HaJeMP7eD"
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
In-Reply-To <87insmj18o.fsf@golem.phantasia.org>
Cancel-Lock sha1:qZeU0zZJXruWlcPhFCH4VkZFd7k=
Xref csiph.com comp.lang.java.programmer:35856

Show key headers only | View raw


On 10/20/2016 2:59 PM, Michael Jung wrote:
> Eric Sosman <esosman@comcast-dot-net.invalid> writes:
>> On 10/19/2016 1:39 PM, Michael Jung wrote:
>>> Eric Sosman <esosman@comcast-dot-net.invalid> writes:
>>>> On 10/19/2016 9:03 AM, Mike Amling wrote:
> [...]
>
> max has the weird distinction between +0, -0, min doesn't, now that's
> weird.

     Hmmm?  Math.min promises to treat -0 as "less than" +0, and says
that min(+0.0, -0.0) will be -0.0.

>>     (A final point: All this argument over the sign of nothing leaves
>> me, I confess, a bit perplexed.  However, those with more numerical
>> sophistication find the distinction between +0 and -0 to be of great
>> practical importance.  William Kahan is particularly vehement on the
>> topic; look for his presentation titled "Branch Cuts for Complex
>> Elementary Functions or Much Ado About Nothing's Sign Bit," and
>> bring more mathematical prowess to your reading than I can. :)
>
> max is not a complex elementary function. sin would be, but I doubt sin
> makes the distinction of +0 and -0 (in fact, it looks like this is OS
> dependent).

     I've already admitted my inability to follow all of Prof. Kahan's
argument, but I think he considers the distinction between -0 and +0
to be essential when one tries to *implement* certain functions.  He's
almost virulent about Fortran's approach to complex quantities, and was
horrified to learn that the Javafolk were thinking about adopting it.
(It seems they dropped the matter; I don't know whether Kahan's
opposition influenced their decision.)

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Fwd: Re: double == double Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-10-19 17:10 -0400
  Re: Fwd: Re: double == double Arne Vajhøj <arne@vajhoej.dk> - 2016-10-19 21:30 -0400
    Re: Fwd: Re: double == double Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-10-20 07:54 -0400
  Re: Fwd: Re: double == double Michael Jung <miju@golem.phantasia.org> - 2016-10-20 20:59 +0200
    Re: Fwd: Re: double == double Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-10-20 15:37 -0400
      Re: Fwd: Re: double == double Michael Jung <miju@golem.phantasia.org> - 2016-10-21 19:53 +0200

csiph-web