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


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

Re: JLS 3/e -- Lots Of Errors

Date 2011-02-06 21:00 -0500
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: JLS 3/e -- Lots Of Errors
References <iiflvc$keg$2@lust.ihug.co.nz> <iijg0g$rrc$4@lust.ihug.co.nz> <iijnm4$d5j$1@news.albasani.net> <iil265$ob4$2@lust.ihug.co.nz> <iil5i6$10m$2@news.eternal-september.org>
Message-ID <4d4f5247$0$23761$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 05-02-2011 22:46, Joshua Cranmer wrote:
> On 02/05/2011 09:48 PM, Lawrence D'Oliveiro wrote:
>> In message<iijnm4$d5j$1@news.albasani.net>, Lew wrote:
>>> On 02/05/2011 07:32 AM, Lawrence D'Oliveiro wrote:
>>>> * Section 5.1.8, page 88: no mention of what happens when you unbox
>>>> a NaN
>>>> (the previous page said only that the boxed object had isNaN()
>>>> evaluating
>>>> to true, no mention of what floatValue() or doubleValue() might
>>>> return).
>>>
>>> Nor is such a mention required, therefore its omission is not an error.
>>> However, it's pretty clear that if 'isNan()' is true, then
>>> 'doubleValue()'
>>> must return 'Double.NaN'.
>>
>> No it is not. The spec carefully refrains from mentioning what
>> floatValue()
>> and doubleValue() return.
>
> Why should it mention it? That is what the documentation on the
> respective classes in the Java Standard API is for.

In fact it would be pretty bad to duplicate the information
from a maintenance perspective.

Arne

Back to comp.lang.java.programmer | Previous | Next | Find similar


Thread

Re: JLS 3/e -- Lots Of Errors Arne Vajhøj <arne@vajhoej.dk> - 2011-02-06 21:00 -0500

csiph-web