Talk:Signed zero
![]() | This article was nominated for deletion on 2005-10-14. The result of the discussion was Keep. |
![]() | This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||
|
Untitled
[edit]Delete, no sources, nothing.
- Positive or negative nothing? --A D Monroe III(talk) 02:24, 6 November 2017 (UTC)
Move?
[edit]Given that the current AFD discussion appears to be headed toward a "keep" result, should this page be moved somewhere after it is over? Maybe Negative zero? NatusRoma 20:11, 17 October 2005 (UTC)
- How about −0? (That's minus zero rather than "hyphen zero".) —BenFrantzDale 05:04, 20 December 2005 (UTC)
- I second −0 (minus zero) like BenFrantzDale suggested. —Liyster 01:25, 12 January 2006 (UTC)
I've moved it to −0 (number), for consistency with −1 (number) and −40 (number). sjorford (talk) 20:59, 15 January 2006 (UTC)
Properties and handling
[edit]Shouldn't we specify that x/0 is undefined? It's lim(x/n,n,0) = infinity, not x/0 = infinity.
- But in IEEE 754, it isn't undefined! Melchoir 01:27, 25 October 2006 (UTC)
- Those two divide by zero examples should be using limits. Just because a computer's nutjob interpretation doesn't care, it doesn't mean we shouldn't. Idyll M (talk) 10:52, 13 June 2008 (UTC)
- The paragraph dealing with this doesn't make absolutely clear that the second sentence refers strictly to the IEEE definition and not the mathematical definition. Also the sentence that says when division by zero is undefined includes infinity/infinity, which is not division by zero. I am hesitant to make changes because I am not a mathematician but somebody needs to look at this. 6StringJazzer (talk) 18:16, 22 September 2011 (UTC)
Complex Number
[edit]In IEE floating point, -0 have special meaning in complex number.
Sqrt( -1 0i ) = 0 i Sqrt( -1 - 0i ) = 0 - i
-- 219.78.124.173 17:02, 4 February 2007 (UTC)
Programming languages
[edit]The article is a bit unusually inaccurate on this issue. The C family is mentioned and so is Java, but the function that "should" be used instead seems to be a C/C function, apparently without a Java equivalent (as none is mentioned). I don't recall Java having the problem, though that doesn't have to mean it doesn't exist. It seems odd to advise programmers in general to use a specific function that seems to be C-specific.
If the standard is language independent, refering to the name of the function doesn't make much sense unless most libraries have it (the equivalent functions for other languages should be named too), otherwise the programmer would be advised to implement it, rather than use it (because it wouldn't be a function, but merely a language independent description of a function). — Ashmodai (talk · contribs) 23:06, 26 October 2006 (UTC)
Zero
[edit]I took the negative zero section from the zero article and put it under Zero and Negative Zero. It seems like it fits but I'm no expert. Does it belong there? --24.8.206.37
- Frankly, I feel it's redundant. There's nothing in that section not already covered in the article. By the way, when you copy text from one article to another, you should make a notation in the edit summary (this has to do with the attribution requirements of the GFDL; if you're not careful about those you could be seen as infringing on the copyright of the original authors). --Trovatore 20:23, 3 May 2007 (UTC)
- Thanks, I didn't know that. I don't edit a lot. --24.8.206.37
Hey everyone, It seems like this article's information could be merged with zero and then this page could simply redirect there.--Cronholm144 21:47, 12 May 2007 (UTC)
- The article Zero contains a section titled "Negative zero". It's one paragraph long, which is appropriate for a general article on zero. It contains a link to this article, which contains in-depth material that wouldn't belong in the general article. This article organization strategy is known as Wikipedia:Summary style. Melchoir 09:19, 13 May 2007 (UTC)
I am aware of this policy and I am capable of working within it. however negative zero is not important enough to have its own article, frankly it could serve to confuse people, sorry to disagree with you on every page that I have worked on, it wasn't intentional--Cronholm144 09:27, 13 May 2007 (UTC)
- Well, as abstract topics, 0.999... confuses lots of people, and 1 − 2 3 − 4 · · · has almost no individual importance. For that matter, 0.999... isn't all that important, and 1 − 2 3 − 4 · · · is pretty confusing. Yet our articles on these two topics are Featured Articles. Should they not exist after all? Melchoir 09:47, 13 May 2007 (UTC)
Limit
[edit]I believe 0− is 'more correct' for a limit approaching zero from the negative direction: I haven't seen −0 used to mean that before in mathematics. — DIV (128.250.204.118 06:01, 1 September 2007 (UTC))
- I agreed with 0− (superscript). But I could not accept 0− (subscript) stated in the first section because I have never seen it elsewhere. --Octra Bond (talk) 10:28, 9 November 2008 (UTC)
- I agree with you both. It would be surprising to see that simply because −0 = 0. The minus sign can be placed any other place except on the left side. I remember 0− (no subsript). 130.243.135.39 (talk) 06:00, 12 July 2009 (UTC)
( 0) vs 0
[edit]The examples include: ( 0) -0 = 0 I assume that ( 0) and 0 are the same thing here, but it would be good to explicitly say. Bobbyi (talk) 14:31, 8 May 2008 (UTC)
rationale for sqrt(-0) = -0
[edit]Can anyone explain why the IEEE standard demands this strange formula? --82.83.126.246 (talk) 12:39, 8 May 2009 (UTC)
- A possible explanation has been given by Nick Maclaren in the stds-754 list: "One that I heard, but haven't checked out thoroughly, is that it is needed for interval arithmetic. The claim was that the interval [-0,x] includes true zero, whereas [ 0,x] doesn't. I was and am unconvinced, but would need to study the matter further to be sure."
- Vincent Lefèvre (talk) 00:43, 30 July 2013 (UTC)
BRD: On how to begin the article and "existence" of -0.
[edit]I am proposing a few changes in the article compared to http://en.wikipedia.org/w/wiki.phtml?oldid=301608811
1. The article should begin with the mathematical meaning of the the expression. Compare with the article 3 (number), it starts with:
- "3 (three) is a number, numeral, and glyph. It is the natural number following 2 and preceding 4."
Everyone knows the meaning of "3", but this is an encyclopedia, so the above description is still necessary. In the case of -0 (number) it is even more important because there are in fact people that don't know what it means.
Even if the case when -0 ≠ 0 is the most interesting one, the case -0 = 0 should be treated first. Perhaps even a short proof of -0 = 0 should be presented for monoids.
2. The article I am criticizing consistently describes "-0" as "non-existing" whenever -0 = 0 and "existing" whenever -0 ≠ 0. Consistency is good, the problem is that it's wrong, -0 of course exists in both cases. Instead of saying -0 "exists" one should explain what it represents and in what sense it differs from 0 or 0.
4. Is is also important to early clarify the fact that there may be two senses of equality involved. If there are in fact two zeros, one should denote them by -0 and 0 to let 0 be their equivalence class. In that sense -(0) = 0 even if -0 ≠ 0.
5. The article is about -0 as a number and not -0 as an expression. Hence parts like "In common usage, −0 may be used to denote ..." could perhaps be removed.
- 130.243.135.39 (talk) 02:39, 12 July 2009 (UTC)
- So I don't agree that the case −0=0 should be treated first — why bother to have an article? Certainly it should be stated that, in ordinary arithmetic, −0=0, but there's no need to be repetitive about it.
- Compare the solution at division by zero. It is clearly stated that, in ordinary arithmetic, a/0 does not denote, but that isn't the focus of the article; there's just not that much to say about that. --Trovatore (talk) 03:31, 12 July 2009 (UTC)
- I agree with you that it is not an interesting case and it shouldn't be the focus of the article. I am totally satisfied with the sentence "in ordinary arithmetic, −0=0". I also think it should be stated very early in the article, just like your example division by zero. (So I will write that in the article.)
- However, I am critical to statements such as "In mathematical terms there is no concept of a negative zero" in an article beginning with "−0 is the representation of negative zero or minus zero" as it may only confuse readers. I tried to reformulate that using the sign function.
- Furthermore, it wouldn't harm to prove that the neutral element always has itself as inverse. But that is of less importance and should not be in the beginning.
- What do you think about 4.? 130.243.135.39 (talk) 05:32, 12 July 2009 (UTC)
- The article says at the beginning that in maths −0 is the same as 0 and I don't see why you want to add 'in ordinary arithmetic'. Maths doesn't have a separate negative zero object, the statement that it does not have the concept seems accurate to me. I don't think sticking in extra words will make the whole business clearer, I find aiming at short but not too short brings clarity. The leader states things clearly now so any improvement would probably use about the same number of words or less. As to the point of proving that −0 is equal to 0 in maths, why stick in the obvious? Just saying they are equal in maths as the leader already does is good enough. This is an encyclopaedia not a textbook. The article really isn't of much relevance to maths and it was going to be deleted before the computery bits were stuck in. It seems okay as it is to me. Dmcq (talk) 10:37, 12 July 2009 (UTC)
- As I described before, it doesn't make it clearer. To say that math doesn't have the concept is simply wrong! In some mathematical structures (monoids or "ordinary arithmetic") −0 happens to equal to 0. But that doesn't make it (or the "concept" of it) non-existent. And in fact this version http://en.wikipedia.org/w/wiki.phtml?oldid=301794158 is much shorter and more to the point.
- A proof of the fact that neutral element has itself as inverse is relevant to the article but not that important.
- I also think the subject is interesting and I don't think the article should be removed. 130.243.135.39 (talk) 02:57, 13 July 2009 (UTC)
I think the first reaction on seeing the article (and its title) is...WTF is this an article? The current lede, explaining the use in computing, answers the question beautifully. I do not understand why you not only trim that material down, but seek to move it from the first sentence. --C S (talk) 12:19, 12 July 2009 (UTC)
- You have a point. What do think about this?
- −0 is the representation of negative zero or minus zero. In ordinary arithmetic, −0 = 0. However, in binary representation of numbers in computing, one bit is generally designated for sign. In many cases this leads to two different representations of the number zero, often denoted by 0 and −0.
- This occurs in some signed number representations for integers, and in most floating point number representations. Use of a floating-point representation that contains negative zero may be necessary to achieve numerical accuracy in some critical problems,[1] and to avoid anomalies in the definitions of elementary functions.[2]
References
- ^ William Kahan, "Branch Cuts for Complex Elementary Functions, or Much Ado About Nothing's Sign Bit", in The State of the Art in Numerical Analysis (eds. Iserles and Powell), Clarendon Press, Oxford, 1987.
- ^ William Kahan, Derivatives in the Complex z-plane, p10.
- It looks good to me! --C S (talk) 06:27, 13 July 2009 (UTC)
Keka changed it to: "However, in computing, some representations allow for representing −0 separately from 0 (the latter is sometimes written 0 for clarity)."
This wouldn't make sense if the reader believes that -0 is no different than 0. I suggest fist presenting the fact that two zeros may exist, then stating that –0 denotes one of them:
"However, in computing, some representations allow for the existence of two zeros, often denoted by −0 and 0 (the latter is sometimes written 0 for clarity)."
Also doesn't 0 represent the equivalence class of -0 and 0? (They are tested equal and we need a symbol of that "abstract" zero as well.) In that case the above is wrong and it should rather be:
"However, in computing, some representations allow for the existence of two zeros, often denoted by −0 and 0."
130.243.135.39 (talk) 10:26, 13 July 2009 (UTC)
- There's no real "equivalence class", at least it would not do much good using one. If one needs to talk about both zeroes, one generally uses the term "zeroes", or "a zero" (note the indefinite article). Mathematically, –0, in a system mathematically describing floating point systems, is NOT equal to 0. It can be modeled as an extra value, not in R, in addition to certain values in R. Call it negzero, or, why not, –0. However, for the computational comparison operations, this special value is "equal" to 0. But only for the computational comparison operations (and there are a few oddball comparisons too, like unordered, which you would not expect for numbers, but are specified for IEEE floating point). These comparison operations should not be confused with mathematical comparisons. Many computational operations treat 0 and –0 differently, but some others return the same value for them both (like the abs operation, not to be confused with the mathematical absolute value function).
- keka, 12:54, 13 July 2009 (UTC)
- Of course there is an equivalence relation. The comparison function (or operation if you prefer) defines one. The relation defines equivalence classes, in particular the set {–0, 0} witch is called 0. The fact that there exist functions that return the same value for both zeros is totally irrelevant. abs would return the same value for -1 and 1 too. Equivalence relation or not, what we are discussing is what to call the "other" zero (except for – –0).
- I looked it up, and it was just the way I suspected. Look in the table at page 18 in Standard for Floating-Point Arithmetic from IEEE.
- The article Signed_number_representation is also using 0/–0 consistently whenever two zeros exist. And so does the polish version http://pl.wikipedia.org/wiki/±0 of our article.
- So I think we should do the same. 130.243.135.39 (talk) 15:50, 13 July 2009 (UTC)
- Plus I note the standard has negativeZero and positiveZro as the names of the class of number corresponding to –0 and 0. Dmcq (talk) 15:55, 13 July 2009 (UTC)
- One thing about 0 I'd been wondering how to phrase is that it is the assumed zero when input to a computer, but can often mean either 0 or –0 when written as an operand in a description. Dmcq (talk) 16:08, 13 July 2009 (UTC)
- I see what you mean. Perhaps something like "The real number 0 is generally encoded as 0, however it can be represented by both 0 and -0." (Or modify it as you wish to fit your text.)
- Also if you want to talk about one of the zeros 0/-0, and not about the real number 0, the correct way to do that is to simply write ±0 (This is what they do in the IEEE pdf). When used in an equation one may also use the opposite symbol in the following way: (note the exchange of and –). Mathematically, this equation is interpreted as two equations; –( 0) = –0 and –(–0) = 0. 130.243.135.39 (talk) 16:40, 13 July 2009 (UTC)
- I've put in 0 or positive zero a few more times and put in the wording about 0 being generally encoded as 0. Hopefully fairly reasonable now thsanks. Dmcq (talk) 21:20, 13 July 2009 (UTC)
Move this page to "Signed zero"?
[edit]If I read this article and think "What would be a proper title?" "Signed zero" seems to be the only answer I can come up with. In fact "−0" is indeed a strange name for it, and "−0 (number)" is even stranger..
This is also the phrase they use in IEEE P754 pdf.
Doing this, the article could expand, describing the algebra of signed zero (with signed infinity?), giving the subject a more formal treatment and mathematical rigor.
This exotic mathematical area is interesting, in particular because it is applied in computer science, and it deserves a good name!
For now, "Signed zero" redirects here, of course we would reverse that and not deleting "−0 (number)".
What do you think? Discuss! Or move it! (I don't know how to rename or move the page.) 130.243.135.39 (talk) 10:24, 14 July 2009 (UTC)
- I definitely agree signed zero would be a better name. Dmcq (talk) 16:36, 14 July 2009 (UTC)
- Please leave it under the current title. See section 1 of this talk page. keka (talk) 17:25, 14 July 2009 (UTC)
- That section didn't discuss signed zero which is what the IEEE standard uses and describes the subject better. Dmcq (talk) 17:35, 14 July 2009 (UTC)
- User C S thinks (see above) visitors first reaction is "WTF is this an article?". He says a good lead would answer this question. But I also think he agrees with me that a more descriptive title would not cause this reaction in the first place. Remember, "minus zero" means nothing but zero if you don't have a priory knowledge that your zeros are signed! 130.243.135.39 (talk) 09:59, 15 July 2009 (UTC)
- While it's dangerous to extrapolate what I would think from one situation to the next, 130.X has guessed well of my approval :-) If the IEEE uses this term and it's more descriptive, why not use it. --C S (talk) 02:29, 31 July 2009 (UTC)
I'm going to have a go at moving the article to 'SIgned zero' then. Dmcq (talk) 11:10, 31 July 2009 (UTC)
I got a negative zero!
[edit]I think it is very important that we add a section on the quote "I got a negative zero!" —Preceding unsigned comment added by 96.255.76.120 (talk) 02:33, 4 July 2010 (UTC)
- I did a google and it didn't seem to have a WP:reliable source or even be in any tiny way notable. Dmcq (talk) 11:48, 4 July 2010 (UTC)
Dude I got a negative zero too! —Preceding unsigned comment added by 138.110.206.101 (talk) 18:50, 5 July 2010 (UTC)
- I once had an old electromechanical printing adding machine that could handle negative numbers. It reported zero as negative when I entered "n-" then "n " and hit the total. Result, "0.00-*"knoodelhed (talk) 01:44, 6 November 2017 (UTC)
x 0 = x
[edit]The article state that . However, according to section 6.3 of the IEEE 754 floating point standard , which contradicts the statement. — Preceding unsigned comment added by 141.3.44.17 (talk) 14:03, 25 November 2013 (UTC)
- I've corrected it. This is true only for x different from 0 (assuming "=" means here identical Level-2 values). Vincent Lefèvre (talk) 18:22, 25 November 2013 (UTC)
Question of equality
[edit]There seems to be some disagreement in how to describe the difference between 0 and -0.
To a mathematician, this article is about a mathematical structure (see Structure (mathematical logic)). Using a proper mathematical terminology removes all uncertainty about what is what.
In any set (mathematics), two element x and y are ether equal or not equal. In this structure the elements 0 and -0 are NOT equal and it should be clearly stated in the article to avoid any confusion. Wordings like "identical", "indistinguishable" or "regarded as equal" should not be used as they do not have a precise definition and add to the confusion.
There is however a binary relation (that is 2-ary and not bitwise) usually called "equality" and written "==" which is used in computing application of this structure. It should be clearly described in the article that this relation is NOT the equality relation (because it returns true upon evaluation of ( 0, -0)) but rather an equivalence relation.
Of course, I do not expect all readers to be mathematicians, but I hope we can agree on descriptions which are mathematically well-defined (and correct) while at the same time easy to understand by non-mathematicians. --130.238.58.207 —Preceding undated comment added 19:22, 22 January 2014 (UTC)
- You say "in this structure 0 and -0 are not equal", but you don't say which structure "this" one is.
- I was talking about any structure that would have "signed zero(s)", but of course, there is no precise definition. --130.238.58.207
- The passage I think you're talking about is the one starting with "in ordinary arithmetic". Now, that phrase doesn't exactly nail down the structure it's talking about, but almost certainly it's one of the following: the integers, the rational numbers, the real numbers, or just possibly the complex numbers. In all those structures, 0 and -0 are indeed identical. --Trovatore (talk) 19:39, 22 January 2014 (UTC)
- I would add:
- What matters is what set one is talking about. 0 and −0 could be regarded as expressions or strings, and in the set of expressions (or strings), these elements are different. Then one can consider their mapping to some set... In computing, there can be many such mappings. The IEEE 754-2008 defines 4 levels, so that one has 4 possible mappings. Now, it would be too complex here to go into such a level of details.
- Whether one uses "equal", "identical", or "indistinguishable" in the second sentence, it doesn't have a mathematical meaning, because "ordinary arithmetic" doesn't specify a set, and "the number 0 does not have a sign" is more or less a tautology ("the" defines a single element). This sentence could be rewritten: "In the set of real numbers, −0, 0 and 0 denote the same element." (I've chosen "real numbers" here instead of integers or more generally an additive group because this is the context of this article). I think that "equal" should be avoided because it has a particular meaning (if not different meanings) in what follows (computing).
- Concerning the next sentence, "regarded as equal by the numerical comparison operations" should now be unambiguous. What's important is that the user understands that "−0 == 0" is true in a programming language, where == denotes the numerical equality.
- Vincent Lefèvre (talk) 00:57, 23 January 2014 (UTC)
- I fully agree with Vincents suggestions.
- Also, the choice of real numbers (as example of additive group) is a particularly good example; I vividly recall trying to convince my students of the fact that 0.99... = 1.00... which is true in real numbers but not true as say strings of digits. This case is very much related to the case of signed zero; in both of them the source of the "problem" is the representation and the "solution" is an equivalence relation. --130.238.58.207
- Well, no, that's not the real solution. The real solution is keeping in mind the distinction between the representation and the thing denoted. In (say) the real numbers, 0 and −0 literally are the same object; when I say that, I'm using the terms " 0" and "−0", in the sense of the use–mention distinction. When Vincent says they "denote" the same object, he's only mentioning them. --Trovatore (talk) 21:56, 23 January 2014 (UTC)
- There are two structures (or sets) at play, A and B, where B = A/~, with ~ an equivalence relation on A. One way to express the difference between A and B is to take two element x and y in A such that x is not equal to y but their equivalence classes in B are equal (i.e. x ~ y). This article is about the structure A ("Signed zero"), it is not about a method on how to construct B (e.g. "Zero in computing"). What I was trying to say was that the real numbers is a good candidate to explain this difference between A and B, simply because there is confusion among some people about the properties of the real numbers. If the reader realizes that even in the real numbers -0 = 0, then the notion of signed zero, a structure where 0 ≠ -0, hopefully becomes clearer. --130.238.58.207 —Preceding undated comment added 18:55, 24 January 2014 (UTC)
- Well, no, that's not the real solution. The real solution is keeping in mind the distinction between the representation and the thing denoted. In (say) the real numbers, 0 and −0 literally are the same object; when I say that, I'm using the terms " 0" and "−0", in the sense of the use–mention distinction. When Vincent says they "denote" the same object, he's only mentioning them. --Trovatore (talk) 21:56, 23 January 2014 (UTC)
"Integers" category
[edit]I'm wondering whether this page should be removed from the "Integers" category. Indeed, when considering a signed zero, it is not in the sense of the integer 0 in general. Moreover, this page is already in the "0 (number)" category, which is a subcategory of the "Integers" category, so that this removal would not be a major loss.
And if this category is kept, what should the sort key be, considering the consistency with the other pages in this category?
Vincent Lefèvre (talk) 14:48, 17 June 2018 (UTC)
- I don't feel strongly about it either way, but you make a good case. I have no objection if you want to remove it. --Trovatore (talk) 04:13, 18 June 2018 (UTC)
- OK, done. Vincent Lefèvre (talk) 21:18, 19 June 2018 (UTC)
Practical use-case of negative zero in a programming language
[edit]JavaScript has positive zero and negative zero. Recently the Intl.RelativeTimeFormat
API was introduced.
This presents a good example of a use-case where distinguishing between positive zero and negative zero is meaningful:
const rtf = new Intl.RelativeTimeFormat('en')
rtf.format(0, 'hours') // 'in 0 hours'
rtf.format(-0, 'hours') // '0 hours ago'
I think this would be worth mentioning in the article.
CesarAndreu (talk) 22:23, 27 February 2019 (UTC)
Use in geometry and 3D-space-modeling
[edit]I think there is a great example that would benefit understandability for someone who first encounters Signed Zero concept:
In geometry, in 3D space, Zero has to be Signed to represent which side the 3D object "looks at" (Normal Vector). A vector can have magnitude of 0, but be directed to either -0 or 0 on any axis. Practically, it is very common to open any popular 3D modeling software (MAX, Blender etc) and create a simple geometry - then select any polygon defined by three vertices and change it's Normal Vector from 0 to -0 and see visually (on screenshot as well) how the triangle of the polygon defined by either 0 or -0 would "look" (be rendered) in opposite directions.
In fact, the lack of visualization on Minus Zero and Plus Zero Normal Vectors is commonly the hardest part to understand by CGI students and newbie 3D-modellers\programmers. If it is to be included in the page, i would gladly provide the illustrations (screenshots) with Vectors pointing to -0 and 0 — Preceding unsigned comment added by M8sterMind (talk • contribs) 14:00, 6 December 2021 (UTC)
- C-Class Computing articles
- Low-importance Computing articles
- C-Class software articles
- Low-importance software articles
- C-Class software articles of Low-importance
- All Software articles
- C-Class Computer science articles
- Low-importance Computer science articles
- C-Class Computer hardware articles
- Low-importance Computer hardware articles
- C-Class Computer hardware articles of Low-importance
- All Computing articles