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


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

Re: Gradual-Underflow Wars

Path csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!feeder.erje.net!news.albasani.net!.POSTED!not-for-mail
From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Gradual-Underflow Wars
Date Sat, 07 May 2011 08:06:53 -0400
Organization albasani.net
Lines 47
Message-ID <iq3ckr$5a5$1@news.albasani.net> (permalink)
References <iq314k$9df$1@lust.ihug.co.nz>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace news.albasani.net iOsPolvZx7ibz8pzoR0BSlblRypMOhogp4naq26sKTB5rmi7PL2y3P2cgLuTIBpxdTXmKEtebgKxhDsN4Tk9Rg==
NNTP-Posting-Date Sat, 7 May 2011 12:06:51 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="1gPEJqX6oOhMaoicxIwfMW4MFFvOyn3GztidOZFNhks+OQf8p+wIwmLX4Xhq1cmZix6xaLOeC1+GSBoqv9HXtCI4U3SQBHvPcwpZt4dfA5FpgVSKi3elwfp8zIJPoXWp"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
In-Reply-To <iq314k$9df$1@lust.ihug.co.nz>
Cancel-Lock sha1:v54/vO/4slqH+9AylaGna0pYPXY=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3763

Show key headers only | View raw


On 05/07/2011 04:50 AM, Lawrence D'Oliveiro wrote:
> Nowadays we take IEEE-754 arithmetic for granted (at least in the hardware;
> language support is another matter, unless you’re using an enlightened
> language like GCC or Python). It was a different matter in the late 1970s,
> when the idea for a standard floating-point architecture first came
> together, spurred by Intel’s development of its 8087 chip.
>
> Hard to believe it now, but the most controversial aspect of the proposal
> was its support for denormalized numbers, to fill in the underflow gap
> between the closest normalized number to zero, and zero itself. In theory
> you could write code that would work correctly without such help, but most
> people didn’t have that kind of skill in numerics. And still don’t.
>
> <http://www.eecs.berkeley.edu/~wkahan/ieee754status/754story.html>
>
> Kahan also has a paper elsewhere deriding the floating-point limitations of
> Java. Java does not distinguish between NaN and infinity, and provides no

Bullshit.  Ignorant bullshit.

<http://download.oracle.com/javase/6/docs/api/java/lang/Double.html#NaN>
<http://download.oracle.com/javase/6/docs/api/java/lang/Double.html#NEGATIVE_INFINITY>
<http://download.oracle.com/javase/6/docs/api/java/lang/Double.html#POSITIVE_INFINITY>

Stop lying.

> way of querying and controlling floating-point exceptions (in the IEEE-754
> sense of “exception”).
>
> His paper was published in 1998, and is still a valid criticism today.

 From the JLS, §4.2.4:
"Operators on floating-point numbers behave as specified by IEEE 754 (with the 
exception of the remainder operator (§15.17.3)). In particular, the Java 
programming language requires support of IEEE 754 denormalized floating-point 
numbers and gradual underflow, ...

"An operation that overflows produces a signed infinity, an operation that 
underflows produces a denormalized value or a signed zero, and an operation 
that has no mathematically definite result produces NaN."

So much for "does not distinguish".

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Gradual-Underflow Wars Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-07 20:50 +1200
  Re: Gradual-Underflow Wars Lew <noone@lewscanon.com> - 2011-05-07 08:06 -0400

csiph-web