Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.java.programmer Subject: Re: JLS 3/e -- Lots Of Errors Followup-To: comp.lang.java.programmer Date: Mon, 07 Feb 2011 15:48:49 +1300 Organization: Geek Central Lines: 37 Message-ID: References: <4d4f5275$0$23761$14726298@news.sunsite.dk> NNTP-Posting-Host: 118-92-86-70.dsl.dyn.ihug.co.nz Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: lust.ihug.co.nz 1297046930 9691 118.92.86.70 (7 Feb 2011 02:48:50 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Mon, 7 Feb 2011 02:48:50 +0000 (UTC) User-Agent: KNode/4.4.7 Xref: csiph.com comp.lang.java.programmer:25641 In message <4d4f5275$0$23761$14726298@news.sunsite.dk>, Arne Vajhøj wrote: > On 06-02-2011 20:32, Lawrence D'Oliveiro wrote: > >> In message, Joshua Cranmer >> wrote: >> >>> On 02/05/2011 09:48 PM, Lawrence D'Oliveiro wrote: >>> >>>> In message, 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. >> >> If that’s the case, there should be a reference to where it’s properly >> defined. > > Why? > > People that read the JLS should have read the Java API (and > a tutorial on Java). Which one first?