Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #33255
| From | Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: -2 ** 2 |
| Date | 2017-05-08 23:16 +0100 |
| Organization | Home |
| Message-ID | <CcSZSzP04OEZFwf4@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <exponentiation-20170504145841@ram.dialup.fu-berlin.de> <slrnogmdu6.50n.jon+usenet@sable.unequivocal.eu> <gaJOA.467$Pq7.63@fx21.iad> <vksmgcp498jf6afkpqavb926g2rhaoj6uh@4ax.com> |
In comp.lang.javascript message <vksmgcp498jf6afkpqavb926g2rhaoj6uh@4ax.
com>, Thu, 4 May 2017 19:29:07, John G Harris
<niam@jghnorth.org.uk.invalid> posted:
>On Thu, 4 May 2017 12:04:12 -0500, Sam E
><why.should.this@be.email.invalid> wrote:
>
> <snip>
>>(EVERY number has 2 square roots).
>
>0 doesn't :-)
Javascript has two zeroes. One is positive and the other is negative.
They are equal in value; but it seems that (in Firefox & Chrome in WinXP
on PC:) they have different square roots of equal value but different
sign - at least, the following expression returns false :-
1/Math.sqrt(-0) == 1/Math.sqrt(+0)
That might represent a bug in ECMA 262 or its implementation.
Math.sqrt is not the only thing in JavaScript which can return -0 ; some
while ago now, it became evident here that The Great Panjandrum Himself
was inadequately aware of that, when the ability was at least useful and
perhaps almost indispensable.
--
(c) John Stockton, Surrey, UK. ¬@merlyn.demon.co.uk Turnpike v6.05 MIME.
Merlyn Web Site < > - FAQish topics, acronyms, & links.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: -2 ** 2 Jon Ribbens <jon+usenet@unequivocal.eu> - 2017-05-04 14:13 +0000
Re: -2 ** 2 Tim Streater <timstreater@greenbee.net> - 2017-05-04 16:56 +0100
Re: -2 ** 2 Mark Lloyd <not@mail.invalid> - 2017-05-04 12:08 -0500
Re: -2 ** 2 John G Harris <niam@jghnorth.org.uk.invalid> - 2017-05-04 20:02 +0100
Re: -2 ** 2 Jon Ribbens <jon+usenet@unequivocal.eu> - 2017-05-04 23:44 +0000
Re: -2 ** 2 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-05 09:16 +0200
Re: -2 ** 2 John G Harris <niam@jghnorth.org.uk.invalid> - 2017-05-05 09:56 +0100
Re: -2 ** 2 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-05 11:16 +0200
Re: -2 ** 2 John G Harris <niam@jghnorth.org.uk.invalid> - 2017-05-06 10:27 +0100
Re: -2 ** 2 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-05-06 11:42 +0200
Re: -2 ** 2 Robert Heller <heller@deepsoft.com> - 2017-05-04 11:01 -0500
Re: -2 ** 2 Sam E <why.should.this@be.email.invalid> - 2017-05-04 12:04 -0500
Re: -2 ** 2 John G Harris <niam@jghnorth.org.uk.invalid> - 2017-05-04 19:29 +0100
Re: -2 ** 2 Tim Streater <timstreater@greenbee.net> - 2017-05-04 19:51 +0100
Re: -2 ** 2 John G Harris <niam@jghnorth.org.uk.invalid> - 2017-05-05 09:41 +0100
Re: -2 ** 2 Tim Slattery <tim@risingdove.com> - 2017-05-05 11:02 -0400
Re: -2 ** 2 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-05 17:47 +0200
Re: -2 ** 2 Tim Streater <timstreater@greenbee.net> - 2017-05-05 16:49 +0100
Re: -2 ** 2 Tim Slattery <tim@risingdove.com> - 2017-05-06 11:21 -0400
Re: -2 ** 2 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-06 19:04 +0200
Re: -2 ** 2 Tim Slattery <tim@risingdove.com> - 2017-05-07 12:40 -0400
Re: -2 ** 2 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-07 20:35 +0200
Re: -2 ** 2 RobG <rgqld@iinet.net.au> - 2017-05-10 17:46 -0700
Re: -2 ** 2 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-11 03:00 +0200
Re: -2 ** 2 Mark Lloyd <not@mail.invalid> - 2017-05-05 23:20 -0500
Re: -2 ** 2 Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-05-08 23:19 +0100
Re: -2 ** 2 Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-05-08 23:16 +0100
Re: -2 ** 2 "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-05-09 09:55 -0700
Re: -2 ** 2 Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-05-10 17:39 +0100
Re: -2 ** 2 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-11 03:08 +0200
csiph-web