Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Date arithmetic Date: Thu, 20 Nov 2014 00:47:13 +0100 Organization: solani.org Lines: 23 Message-ID: References: <111120142237479787%timstreater@greenbee.net> <6814026.8sujcrue1K@PointedEars.de> <5592bc20-5fa3-4b2d-8534-1c81d62c31a5@googlegroups.com> <5371045.XxPr97Xf0d@PointedEars.de> <877fyr3sxr.fsf@bsb.me.uk> <191120142232431812%timstreater@greenbee.net> <87k32q3h7i.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1416440825 17837 eJwFwYEBwCAIA7CX6LBlO6fK+P8EE6agU0vU4nCcR+7JV1KzChiGM43N6R1tOvoBvt+F5gUhmRFH (19 Nov 2014 23:47:05 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Wed, 19 Nov 2014 23:47:05 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 X-User-ID: eJwNwokRwDAIA7CZHMDAOHnw/iO0J4URvOkMeuhnPWPypburU86DQtrkw9GrbdS0Az014voAIjgRUw== In-Reply-To: <87k32q3h7i.fsf@bsb.me.uk> Cancel-Lock: sha1:/czRucYeNtcOgJsqe9R4NbN5IPs= X-NNTP-Posting-Host: eJwNyMEBgDAIA8CVCjRE1iHI/iPoPQ+RluJN5MViy+kk1QNFl8ZcUbP29jnZaeWN8/wjDVEfG9MRPQ== Xref: csiph.com comp.lang.javascript:26177 Ben Bacarisse wrote: > Tim Streater writes: > >> In article <877fyr3sxr.fsf@bsb.me.uk>, Ben Bacarisse >> wrote: >> >>> ECMAScript does not have a separate integer type. You can represent any >>> integer in (2^53, 2^53) exactly (and zero twice!) using the built-in >>> Number type, but you are still using a floating point type as far as the >>> language definition goes. >> >> Why twice? is the javascript VM a ones-complement machine? > > I'm talking about what the recent (5.1) language standard says. The > Number type uses the IEEE 754 64-bit floating point format in which (to > quote) "there is both a positive zero and a negative zero" but you have > to work hard to find out which one you have! To be precise, the IEEE 754 double-precision 64-bit *binary* format. :) -- Christoph M. Becker