From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: even and odd numbers
Date: Thu, 29 Jan 2009 03:53:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <glr96t$1er$>
References: <glikor$epo$> <glin7g$lf7$> <glnjg1$12h$> <glnkaa$qnp$> <glnlk5$c4e$> <glp6mp$kq1$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1233201181 1499 (29 Jan 2009 03:53:01 GMT)
NNTP-Posting-Date: Thu, 29 Jan 2009 03:53:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:514621

"us " <> wrote in message <glp6mp$kq1$>...
> .......
> % BITMAX is the largest number, which gives a correct result...
>      help bitmax
> .......

  I agree with you, Urs.  'bitmax' would be the largest number that would give the correct answer as to a double floating point integer's least bit.

  However, it is rather amusing to read Mathworks' documentation for 'bitmax'.  They say, "bitmax returns the maximum unsigned double-precision floating-point integer for your computer. It is the value when all bits are set, namely the value 2^53-1."  This is wildly wrong!  In fact every floating point number beyond that is of necessity an integer and what is more, an even integer.  They meant to say something very different - something like: beyond this all numbers must have a zero in their units binary digit position and therefore can represent neither numbers with a fractional part nor odd integers.

Roger Stafford