Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31950
| Path | csiph.com!news.redatomik.org!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Tim Streater <timstreater@greenbee.net> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Why JavaScript has two zeros |
| Date | Fri, 23 Dec 2016 09:05:53 +0000 |
| Lines | 29 |
| Message-ID | <231220160905534005%timstreater@greenbee.net> (permalink) |
| References | <84234e86-ac01-4a9e-9d21-dc1cdc30678c@googlegroups.com> <1bm6A.536745$IJ6.194196@fx46.am4> <LMKbWltZUGXYFwDf@invalid.uk.co.demon.merlyn.invalid> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net JwfbBz1pwaZnbKHJjKlrIgsX5PhBo9jxOlP6IKopOGBg3rVAlZ |
| X-Orig-Path | timstreater |
| Cancel-Lock | sha1:SoNq/XG65IvFu2LlkpXBF8ihALo= |
| Mail-Copies-To | nobody |
| User-Agent | Thoth/1.9.1 (Mac OS X) |
| X-No-Trace | yes |
| X-No-Archive | yes |
| X-Face | "[^yYK92E9|LVD+Av;Fa,giW>Pb"sKU%_`r0#U!ev`>CN2z}$mY(LO@{)-Mo1 )]#\pO1*O.$hdJl67V?e*J6`nb]cCpJ5<<e&qJ+e+,TI|2/F\d`C#*a*9d^?WOq'H.*% V?'C+Fi^W-l)f"Ru5V("V~M:yU/Y"W3F[O!t|M1+Q&_.LEV>ZRWNth$Kw0j3f8lz:H9T N5[T'*t:]%pcYSZM |
| Xref | csiph.com comp.lang.javascript:31950 |
Show key headers only | View raw
In article <LMKbWltZUGXYFwDf@invalid.uk.co.demon.merlyn.invalid>, Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> wrote: >In comp.lang.javascript message <1bm6A.536745$IJ6.194196@fx46.am4>, Wed, >21 Dec 2016 02:55:57, cyber@2trom.com posted: > >>abdulapopoola@gmail.com wrote: >>> Do you know that there are actually two zero value types in >>>JavaScript (as well as most languages)? Read to know why this matters, >>>what scenarios to watch out for and some of the quirks of the IEEE 754 >>>standard. >>> >>> https://abdulapopoola.com/2016/12/19/why-javascript-has-two-zeros-0-and-0/ >> >>I imagine that also having -0i and 0i might be too complex for JavaScript. > >JavaScript has two zeroes (of equal but distinguishable values) because >IEEE 754 is a sign-magnitude-exponent representation. They are the >reciprocals of the two infinities. Long-established readers with good >memories should recall at least one occasion on which having two zeroes >was arithmetically useful. Not sure I ever found it useful for integers - such as on the CDC 6000 series machines. -- "Once you adopt the unix paradigm, the variants cease to be a problem - you bitch, of course, but that's because bitching is fun, unlike M$ OS's, where bitching is required to keep your head from exploding." - S Stremler in afc
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why JavaScript has two zeros abdulapopoola@gmail.com - 2016-12-19 21:09 -0800
Re: Why JavaScript has two zeros "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-12-20 11:46 +0100
Re: Why JavaScript has two zeros John Harris <niam@jghnorth.org.uk.invalid> - 2016-12-20 17:58 +0000
Re: Why JavaScript has two zeros "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-12-20 23:56 +0100
Re: Why JavaScript has two zeros John Harris <niam@jghnorth.org.uk.invalid> - 2016-12-21 13:59 +0000
Re: Why JavaScript has two zeros <cyber@2trom.com> - 2016-12-21 02:55 +0000
Re: Why JavaScript has two zeros Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-12-22 23:43 +0000
Re: Why JavaScript has two zeros "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-12-23 09:04 +0100
Re: Why JavaScript has two zeros Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-12-25 22:15 +0000
Re: Why JavaScript has two zeros Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-12-25 23:39 +0000
Re: Why JavaScript has two zeros Tim Streater <timstreater@greenbee.net> - 2016-12-23 09:05 +0000
Re: Why JavaScript has two zeros Ram Tobolski <ramtob@gmail.com> - 2016-12-24 02:28 -0800
Re: Why JavaScript has two zeros Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-12-25 22:00 +0000
Re: Why JavaScript has two zeros "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-12-26 12:08 -0800
Why JavaScript has two zeros Ram Tobolski <ramtob@gmail.com> - 2016-12-21 10:20 -0800
Re: Why JavaScript has two zeros "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-12-26 12:03 -0800
csiph-web