Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Date arithmetic Date: Thu, 20 Nov 2014 00:17:50 +0000 Organization: A noiseless patient Spider Lines: 28 Message-ID: <878uj63ett.fsf@bsb.me.uk> 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 Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="15061"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/C6vcA0x7VT9gudR77GRevBhU3ToliTiY=" Cancel-Lock: sha1:UxZYjUmlsB+pb6ShpkDkeC+5nII= sha1:36nfaxPBRuCAfsQVNaEii3w7W6I= X-BSB-Auth: 1.31dfc63f6fcca3503a55.20141120001750GMT.878uj63ett.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:26178 "Christoph M. Becker" writes: > 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. :) Very true. -- Ben.