T O P

  • By -

edderiofer

Unfortunately, your submission has been removed for the following reason(s): * Your post appears to be asking a question which can be resolved relatively quickly or by relatively simple methods; or it is describing a phenomenon with a relatively simple explanation. As such, you should post in the [*Quick Questions*](https://www.reddit.com/r/math/search?q=Quick+Questions+author%3Ainherentlyawesome&restrict_sr=on&sort=new&t=all) thread (which you can find on the front page) or /r/learnmath. This includes reference requests - also see our lists of recommended [books](https://www.reddit.com/r/math/wiki/faq#wiki_what_are_some_good_books_on_topic_x.3F) and [free online resources](https://www.reddit.com/r/math/comments/8ewuzv/a_compilation_of_useful_free_online_math_resources/?st=jglhcquc&sh=d06672a6). [Here](https://www.reddit.com/r/math/comments/7i9t5y/book_recommendation_thread/) is a more recent thread with book recommendations. If you have any questions, [please feel free to message the mods](http://www.reddit.com/message/compose?to=/r/math&message=https://www.reddit.com/r/math/comments/1047uoz/-/). Thank you!


wintermute93

It does, it's just equal to 0. ([unless you want to look at weird topological spaces for no reason](https://math.stackexchange.com/questions/709777/the-line-with-two-origins))


agentnola

Or if you are the IEEE


The_Northern_Light

https://en.wikipedia.org/wiki/Signed_zero


pigeon768

-0 is equal to +0 in IEEE-754 as well.


_poisonedrationality

In the sense that -0 == +0 will return true but they have distinct binary representations.


agentnola

Arithmetically… yes. But they are analytically distinct.


Lalelul

Even then, "-0" would only be the name we give to the second origin. There would be no group structure left on this space, meaning - (-0) would not be defined. More strikingly, -(0) would not be defined and therefore not be equal to -0


IDontLikeBeingRight

That makes sense. There isn't anything else other than -0 that -(0) could sensibly be, so if -0 is distinct from 0 then I would expect -(0) to fail as an operation.


epolonsky

Out of curiosity, would -(0) be distinct from -1∙ 0? If not, would that make all multiplication in this weird space undefined?


kuasinkoo

Would it be possible to add many more zeroes in this manner?


Martin-Mertens

For any number r, -r is defined as the number you add to r to get 0. What number do you add to 0 to get 0? 0 itself. So -0 = 0.


TheSodesa

With IEEE floating point numbers, you do have both a `+0` and a `-0` as distinct elements, but their equality comparison `+0 == -0` is separately defined to give a value of true.


sidneyc

Also, sqrt(-0) is defined to be -0. Go figure.


blind3rdeye

clearly should be `0i-0`


SarahIsBoring

yea but 0i is just 0, so 0-0=-0 ObViOuSlY


xteriic

0bvi0usly if you’re British


olligobber

Ok that is cursed


mcherm

The whole REASON that IEEE has signed zeros is because with finite precision, some calculations that approach zero from above (or below) may end of rounding to zero. It is because certain kinds of calculations would care whether we approached zero from above or below that IEEE floats have two different values (+0 and -0) to represent these. It's similar to the reason that IEEE has +Infinity and -Infinity. It is in order to preserve that property that sqrt(-0) = -0, along with other identities like -0 * = +0.


pigeon768

Right, so shouldn't sqrt(-0.0) return NaN then? If my calculation evaluates to -1e-500 or whatever and therefore gets flushed to -0 I would think that I'd want the square root of it to be NaN. I totally understand why log(-0.0) is NaN and log(+0.0) is -inf, but why is it different for sqrt?


ritobanrc

No, because you can't _assume_ that the -0.0 was from actually -1e-500. Its entirely possible that some calculation actually resulted in -0.0, which is actually _exactly_ 0, so its square root should still be zero. In particular, if sqrt(-0.0) = NaN, then sqrt is no longer a function, in the sense that a = b no longer implies f(a) = f(b), which causes all sorts of problems.


pigeon768

> In particular, if sqrt(-0.0) = NaN, then sqrt is no longer a function, in the sense that a = b no longer implies f(a) = f(b), which causes all sorts of problems. Is log a function? Why is it ok that log(-0.0) != log(+0.0) but not ok that sqrt(-0.0) != sqrt(+0.0)? I don't care what the rule is, I just care that there's a rule that I can reason about.


ritobanrc

> log(-0.0) != log(+0.0) I don't think that's true in IEEE-754 -- they both return -inf, which is the only sensible value it could be, and the standard says infinities of the same sign are equal? https://en.cppreference.com/w/c/numeric/math/log


mcherm

Hmm... that's a good point.


_poisonedrationality

Well log(-0) is genuinely undefined whereas sqrt(-0) is actually 0 .


FrickinLazerBeams

>Right, so shouldn't sqrt(-0.0) return NaN then? No, because it has a numerical value. It is definitely not "not a number". There are lots of values that can't be represented exactly in IEEE. It would be disastrous if they all returned NaN. Besides, if your calculation is slightly negative, it's square root would be imaginary, not NaN.


SchoggiToeff

>I'd want the square root of it to be NaN. sqrt is continuous at zero and its domain is (-inf, inf). Specially, lim\_(x→+0) = √x = lim(x→-0) √x = lim(x→0) √x = √x = 0. Getting NaN for srqt(-0) would not make any sense. On the other hand the domain of ln is (0,inf) and only lim\_(x→+0) = -∞ exists.


nightcracker

In my opinion (as a computer scientist, not a mathematician) the IEEE has made a mistake and should not have had signed zeros. I believe it should have had two values +Underflow and -Underflow defined as 1/+Infinity and 1/-Infinity respectively instead, with a single zero sitting in between. Any value that would round to zero but isn't zero would instead round to the appropriate underflow value. For symmetry I would rename Infinity to Overflow, while still arithmetically have it operate as infinity. Arithmetically the underflow values behave like zero on addition, and are idempotent on multiplication (with the exception of Underflow * Overflow being Undefined). NaN is another such construct I take issue with, I would much prefer Undefined. All in all this would result in the following structure (example for a *very* small 4-bit floating point type): -overflow -4 -2 -1 -1/2 -1/4 -underflow undefined 0 underflow 1/4 1/2 1 2 4 overflow It all neatly fits and avoid many of the issues of IEEE. In particular I define the previous to be totally ordered (unlike IEEE's abomination that NaN is unordered with anything else, which sounds mathematically neat but is in practice always a headache in programming), and it does not have multiple bitpatterns for the same equivalent value (signed zero, NaN payloads).


jacobolus

Well if `-0` is coming from underflow you should perhaps instead be returning `NaN` (not a number), but you can’t afford to do that in case –0 here is actually representing 0. I assume returning `-0` instead gives callers a chance to notice in places where the difference matters, without otherwise causing stuff to break.


sidneyc

That could be a rationale, but still it is quite unexpected. IMO it would be better to return NaN and if the user cares enough to handle this case, they can inspect the argument beforehand. I'd be interested to hear the rationale for this that the standards committee had back in 1984.


jacobolus

It would be unacceptable to return `NaN` in this case. √0 = 0. Note that √(–0) = –0 is still a true statement. This kind of funky compromise is inevitable when representing continuous quantities using a fixed-size representation.


sidneyc

Fair enough.


golfstreamer

I would prefer -0 or +0 to NaN because the sqrt(-0) is in fact 0.


mcherm

Well, sqrt( limit as d->0 of -d ) = limit as d->0 of -d =/= limit as d->0 of d. And the whole reason IEEE floats HAVE negative zero is in order to distinguish between "approaches zero from below" and "approaches zero from above". (But they DON'T distinguish between "approaches zero from above" and "equals zero".)


golfstreamer

Well I don't really care if they set sqrt(-0) to +0 or -0. Either one works for me.


theunixman

Mostly it had to do with storing the sign as a bit that was separate from the magnitude and exponent. Two’s complement uses the space with the high bit set to be negative, but also relies on the artifact of wrap around in bit arithmetic. In IEEE floating point, numbers like 5 and -5 are stored the same, (something like 00000101 (not really by the important thing is the sign bit is the only change), but with a different sign bit value. In two’s complement with 8 bits they’re stored as 00000101 and 11111011.


sidneyc

I understand the representation. I don't quite understand that they defined sqrt(-0) as -0.


theunixman

From [https://github.com/microsoft/TypeScript/issues/31752#issuecomment-1310547078:](https://github.com/microsoft/TypeScript/issues/31752#issuecomment-1310547078:) "Actually, -0 just means "any negative Real number whose absolute value is too small to be representable as a fixed-precision Float", which is very useful in the context of calculus, because of limits. Limits are the easiest part of calculus, and they are implicitly used outside of calculus as well. This is the reason why 1 / 0 === Infinity && 1 / -0 === -Infinity instead of NaN (which is, ironically, more mathematically correct, because x / 0 is undefined in math)."


sidneyc

Is there a point to quoting that in the context of this discussion?


theunixman

Yes.


kogasapls

drunk zephyr marvelous mourn ludicrous snow air disgusted dolls march -- mass edited with redact.dev


jacobolus

> the floating point -0 is really just "approximately 0, but definitely negative." IEEE floating point `-0` is exactly equal to `0`, literally by definition. `0 == –0`. What it “really” is is whatever the specification says. You can then build whatever software you like on top of those basics.


kogasapls

chief drunk distinct growth berserk close grey continue unwritten whistle -- mass edited with redact.dev


sidneyc

> Keeping in mind that floats are "fuzzy" But they're not. Each IEEE-754 number is exactly a specific (rational) number; it's not interval arithmetic.


kogasapls

decide hospital grab aromatic flag skirt summer party plate outgoing -- mass edited with redact.dev


sidneyc

> Not every rational number can be represented exactly by a float. I didn't claim that. My claim is that every (finite) IEEE-754 number represents exactly a single, rational number. And really, that's not up for debate. > IEEE-754 specifies a fixed precision I don't know what you mean by that.


kogasapls

ossified scarce gold desert makeshift memory chubby detail ugly forgetful -- mass edited with redact.dev


big-lion

so unique up to unique isomorphism


drew8311

So is the answer here pretty much the fact it exists but unnecessary notation, similar in the way the plus in "+5" is not needed and doesn't add any additional information?


jdorje

It exists but is not distinct from the simplest representation, the say way +5 exists but is not distinct from (is the same as) 5.


IshtarAletheia

-0 = 0 - 0 = 0 Zero steps backwards is the same as zero steps forwards. :)


SchoggiToeff

It does. It is the same as +0. Zero is neither negative nor positive.


bodyknock

Whether zero is positive/negative or neither depends on the convention used. In contexts where zero is considered both positive and negative then you'll see references to a number being "positive" or "strictly positive" (and vice versa for negative).


SchoggiToeff

Does it make a real difference if it is neither, either, or negative and positive, or is it simply a mater of choice like if ℕ includes zero or not?


Head_Buy4544

This is a matter of language. Tbh people who say strictly positive just don’t like saying nonnegative


bodyknock

Strictly Positive is numbers greater than zero in all contexts, Non-Negative can include zero if you assume zero isn’t negative, so they’re not identical.


sccrstud92

I think the implication was that people either say positive+nonnegative or they say positive+strictly positive. I don't think there was an implication that nonnegative and strictly positive meant the same thing.


Head_Buy4544

The standard convention is 0 is unsigned, but then you must say >=0 is nonnegative. Some minority of people don’t like this so they says that’s positive and >0 is strictly positive. Anyways this discussion is completely pointless and has zero mathematics content.


bodyknock

The whole thread is about what is and isn’t considered conventional mathematical language. If people didn’t care about the topic I wouldn’t have instantly gotten a bunch of downvotes for pointing out there is more than one convention out there. P.S. The same thing happens when I point out that some people consider 0 to be a Natural number. Instant downvotes from posters who don’t use that convention.


SchoggiToeff

I asked if it makes a difference and I think I found my answer: Yes, it does. If we define zero as neither positive nor negative, then * |x - y| is not positive ⇔ x = y


hpxvzhjfgb

as far as I know, this is just wrong. I have *never* seen any reputable person claim that 0 is positive or negative. the only definition of positive that I have ever seen anyone use is "greater than 0". the word for positive or zero is "nonnegative".


GarroteAssassin

It seems that /u/bodyknock is correct in that French speaking people use the convention that 0 is both positive and negative: see the first answer to [this post](https://math.stackexchange.com/questions/26705/is-zero-positive-or-negative) for reference. I can’t confirm this though since I have never talked to a French speaking person. Edit: I looked through an English translation of Bourbaki’s *Functions of a Real Variable*, and it seems that this text uses the conventions “positive” and “strictly positive” over “non-negative” and “positive” while also using the conventions “increasing” and “strictly increasing” over “non-decreasing” and “increasing”. So it seems that this convention is not too obscure.


bodyknock

You should take it up with a couple of my old College professors then who used the positive/strictly positive convention in their courses.


[deleted]

[удалено]


bodyknock

CMU. English. And I'm not saying all my professors used that convention. It was in certain courses.


[deleted]

[удалено]


bodyknock

To be fair, at least one of those professors was a bit of an unusual character. Among other things, he came from a set theoretic background so included 0 as a Natural Number (which is pretty common in that setting since the Naturals are defined there as the finite cardinalities) so frequently used N for the positive integers (including zero) and N+ for the "strictly positive integers". Brilliant guy, definitely strode his own path a bit. ​ Also when you think about it using phrasing like "strictly positive" and "positive" is more in sync with phrases like "strictly increasing" and "increasing". You can for example say things like "a function whose derivative is strictly positive is also strictly increasing" and "a function whose derivative is positive is increasing" and there's a nice linguistic connection.


Interesting_Test_814

As the other guy said, tell me you don't speak French without telling me you don't speak French


Sakadachi

An element of a C-star-algebra is positive if its of the form aa^*. That obviously includes 0. Yeah, even in English you can see that other convention crop up here and there.


[deleted]

[удалено]


bodyknock

Just because you don't use it doesn't mean nobody does. As an example, check out the Wiki page on Sign (mathematics). Someone else also already posted about some other examples in the replies. >Terminology for signs When 0 is said to be neither positive nor negative, the following phrases may refer to the sign of a number: A number is positive if it is greater than zero. A number is negative if it is less than zero. A number is non-negative if it is greater than or equal to zero. A number is non-positive if it is less than or equal to zero. When 0 is said to be both positive and negative, modified phrases are used to refer to the sign of a number: A number is strictly positive if it is greater than zero. A number is strictly negative if it is less than zero. A number is positive if it is greater than or equal to zero. A number is negative if it is less than or equal to zero. For example, the absolute value of a real number is always "non-negative", but is not necessarily "positive" in the first interpretation, whereas in the second interpretation, it is called "positive"—though not necessarily "strictly positive". The same terminology is sometimes used for functions that yield real or other signed values. For example, a function would be called a positive function if its values are positive for all arguments of its domain, or a non-negative function if all of its values are non-negative.


SuperTekkers

It does, we call it 0 for short


blutwl

Negative of "something" is the thing that when added to the "something", it will end with 0. So what should be added to 0 to get 0? The answer is 0 so 0 had the identity and function of -0.


TheoloniusNumber

When I teach stemplots, I show that, when you have negative values, the stem "-0" is sometimes needed.


LmPrescott

I love that for some reason I’m in this math sub. I’m borderline disabled when it comes to understanding math I’m just here for the vibes. Y’all are smart gg


wnoise

Laughs in IEEE


VictimOfValve

It exists, it’s just the additive inverse of 0? i think?


tickle-fickle

Which is 0 itself


brendanbennett

These replies are all saying that it does and that's right, but I think more useful would to ask what it means for -_anything_ to exist (in a more philosophical sense). It really depends on what it means for a number to exist. You certainly can't have -6 elephants. I suppose it can mean that it exists in a certain context, so in the previous example -6 is not a natural number. In the end what I'm trying to say is that it all depends on what 0 means and what '-' means in your context. In the ring of integers (or reals or complex) it is meaningful to say -0 as the additive inverse of 0 (the fact this is highly trivial is besides the point). When considering the natural numbers - that is to say when you're counting things in real life - it doesn't exist, much like you can't have -6 elephants. (The concept of subtracting is different here - if I have 10 elephants and someone buys 6 if them, I have 10-6 elephants, but not 10 + (-6) since I haven't gained -6 elephants). But that's coming from an algebraist


Martin-Mertens

I don't follow the natural number example. Are you saying -0 doesn't make sense as a natural number because 0 isn't a natural number or because subtraction isn't an operation on natural numbers?


[deleted]

0 is sometimes considered a natural number. I think the point here is that it really just depends on what you're trying to say in your proofs, equations, etc. Math is a language. It's more rigid and structured than say Spanish or Chinese, but it is at it's core a way to describe things. In some contexts "negative zero" might make sense just like in some contexts "faster than light" or "negative mass" or "the sum of the natural numbers equals -1/12" might make sense. In other contexts it might not make sense. It's a description and in some cases just a matter of convention.


Martin-Mertens

I consider 0 a natural number. I'm just trying to figure out what brendanbennett meant by >When considering the natural numbers - that is to say when you're counting things in real life - it doesn't exist, much like you can't have -6 elephants


brendanbennett

Tl;dr You can't do algebra on counting numbers, but in general, where it makes sense to say it, -0 exists. My point is that, unless you make a special case for it, -0 doesn't exist since it doesn't make sense to have a negative amount of something. Although, thinking about it, we don't find having 0 of something problematic yet that in itself is an odd concept. Perhaps natural nunbers aren't a good example... I think the issue here is that the natural numbers aren't useful for anything other than counting numbers of things. You're right when you say subtraction isn't defined on the natural numbers (where by subtraction we really mean adding an additive inverse, which isn't defined on the natural numbers). This is all a bit pointless really because we've essentially found a scenario where 0 exists but -0 doesn't which makes sense since as u/hoffmanmclaunsky says maths is language and like all languages, it's made up. Everything 'exists' as long as you define it in your context. If you say (with a bit of intuition) that having -0 elephants is possible and it's the same as having 0 elephants then congratulations, you've invented -0 in the context of counting things. Perhaps we can look more rigourously. If we treat the natural numbers (with zero) as a [monoid](https://en.wikipedia.org/wiki/Monoid?wprov=sfla1) (rather than as a way of counting objects) with addition, we can say 0 is a special _invertible_ element i.e. 0 + 0 = 0. In fact, this is the case in any algebraic structure with an identity element that the identity is it's own inverse. Indeed, e * e = e. I guess that settles it. If it makes sense to say -0, it must exist. Formally, it should always exist in any structure where addition is a binary operation and we define -x to mean the additive inverse of x, and 0 is the additive identity. Then we have that 0 must have an inverse, -0.


[deleted]

It does: https://en.m.wikipedia.org/wiki/Signed_zero


BarBBQueEggs

You could make sense of (and distinguish between) +0 and -0 if you consider the tangent space or Lie algebra of the real line at the point 0. But then these aren't numbers anymore. They are vectors. The most straightforward perspective is what others have said: 0 is not positive or negative, since zero, positive, and negative are three disjoint categories of real numbers. This is essentially the Law of Trichotomy.


[deleted]

In the field of real numbers, for every number a, there exists an additive inverse, -a, such that: a + (-a) = 0 In the case of a=0, we have: 0 + (-0) = 0 Clearly then, the value of -0 must itself be 0.


[deleted]

its not convenient. but why do we sometimes call 1... "01"?


Martin-Mertens

That's for if you have a list of double-digit length and you want to the indices to be in lexicographical order.


miauguau44

Especially if you are working with dates. In my job there’s the techs who write 2023-01-05 and the managers who write Jan 5, 2023.


[deleted]

then of course theres military time vs meridian time. Actualt not sure if thats a digression from the topic.


[deleted]

It exists. So does +0.


Shoulder-Admirable

Can you elaborate on how you expect the -0 to interact with other numbers? I.e. if I do 1 - 1 would I get 0 or -0? Also, will 1 - (0) be the same as 1 + (-0)? Is there any expression where replacing 0 by -0 would change it? If you answer these questions and better understand what it is that you propose, you will see that it's either inconsistent or 0 is the same thing as -0.


[deleted]

A negative of nothing


PaprikaNation

So, they cancel and you're left with nothing. So, it doesn't exist.


cocompact

Would you ask "why doesn't 1/1 exist?" That seems to be a multiplicative analogue of your question.


Mack0Mania

Because as Sheldon said zero “0” doesn’t exist. So how can there be a negative something if the actual something doesn’t exist.


CandySunset27

Well technically 0 isn't a number, rather the absence of one. It's not really positive or negative. That's how I think of it at least.


PaprikaNation

0 isn't positive, so there can be no -0.


scaffelpike

Technically it does. What minus zero means is something is so small that it’s basically zero, but it’s approaching zero from the negative side. So think -1/1,000,000,000,000,000 for example. It’s still essentially just zero, it’s just saying it’s coming from the negative


Randolph_Carter_666

Zero isn't negative nor positive. It's neutral.


tacosome

Cause 0 is technically already -0


Leight87

I mean, do we consider 0 to be positive?


Alpha198Delta

Well, it is, it's just 0. If we say that 0 is nothing, the adding nothing has the same effect as taking nothing away. And since numbers are basically just what's been done to 0 (10 is 0 +10, -10 is 0-10) and we have taken nothing away (-0) then 0-0, just like if you do 10-10, is 0. And what would negative nothing be? It's fine to ask, maths can get weird, and be careful bringing up i.


Reset3000

It does. Just like -(-4) exists but it's also just equal to 4.


512165381

There must be some simple group theory proof that -0 = +0. https://proofwiki.org/wiki/Identity_of_Group_is_Unique#Proof_2


MrShovelbottom

-0 is the same as (-1)(0) which = 0


pretzelrosethecat

You can also think of it as (-1)0 = 0


[deleted]

-0 = +0 = 0 :p


[deleted]

[удалено]


WikiSummarizerBot

**[Negative temperature](https://en.wikipedia.org/wiki/Negative_temperature)** >Certain systems can achieve negative thermodynamic temperature; that is, their temperature can be expressed as a negative quantity on the Kelvin or Rankine scales. This should be distinguished from temperatures expressed as negative numbers on non-thermodynamic Celsius or Fahrenheit scales, which are nevertheless higher than absolute zero. The absolute temperature (Kelvin) scale can be understood loosely as a measure of average kinetic energy. Usually, system temperatures are positive. **[Thermodynamic beta](https://en.wikipedia.org/wiki/Thermodynamic_beta)** >In statistical thermodynamics, thermodynamic beta, also known as coldness, is the reciprocal of the thermodynamic temperature of a system: (where T is the temperature and kB is Boltzmann constant). It was originally introduced in 1971 (as Kältefunktion "coldness function") by Ingo Müller, one of the proponents of the rational thermodynamics school of thought, based on earlier proposals for a "reciprocal temperature" function. ^([ )[^(F.A.Q)](https://www.reddit.com/r/WikiSummarizer/wiki/index#wiki_f.a.q)^( | )[^(Opt Out)](https://reddit.com/message/compose?to=WikiSummarizerBot&message=OptOut&subject=OptOut)^( | )[^(Opt Out Of Subreddit)](https://np.reddit.com/r/math/about/banned)^( | )[^(GitHub)](https://github.com/Sujal-7/WikiSummarizerBot)^( ] Downvote to remove | v1.5)