News for hackers. Stuff that matters.
Re:Anna Karenina Principle by phkahler on Friday August 30, 2019 @06:24PM (#20843267)
Zero is not an indicator of success. It is a lack of failure (NULL). That distinction is why some people think the "flag" is inverted.
Re:Anna Karenina Principle by reallydude on Friday August 30, 2019 @06:29PM (#20843305)
As per the principle, the lack of failure is how success can be measured.

ie Consequently, a successful endeavor (subject to this principle) is one where every possible deficiency has been avoided.

Re:Anna Karenina Principle by jacquesm on Friday August 30, 2019 @06:59PM (#20843503)
I always took this to be 'there is only one success, there are many failures', there is only one zero, but many values other than zero. It seemed kind of logical.
Re:Anna Karenina Principle by TheRealSteel on Friday August 30, 2019 @07:02PM (#20843517)
There is only one of any number.
Re:Anna Karenina Principle by jacquesm on Friday August 30, 2019 @07:03PM (#20843523)
That is true, in the pedantic sense but zero has many properties that other numbers do not.
Re:Anna Karenina Principle by cgriswald on Friday August 30, 2019 @09:03PM (#20844015)
Re:Anna Karenina Principle by j1vms on Friday August 30, 2019 @10:02PM (#20844196)
> zero has many properties that other numbers do not

In particular, zero is the additive identity [0] in almost all the "usual" number systems in which it appears. That is roughly speaking, it is the only A such that X + A = X, for all X, where X and A are elements of the number system (e.g. field of real/complex numbers).

[0] https://en.wikipedia.org/wiki/Additive_identity

Re:Anna Karenina Principle by jakobegger on Saturday August 31, 2019 @12:48AM (#20844661)
It's also the only real number that does not have an inverse element for multiplication (there is no number b such that (a * 0) * b = a)
Re:Anna Karenina Principle by james_s_tayler on Saturday August 31, 2019 @01:08AM (#20844700)
The integers form a group under multiplication though and a key property of a group is that every element has an inverse. So how does the definition hold if there is nothing that could be considered an inverse for the number 0? Curious about this... I never thought about it before.
Re:Anna Karenina Principle by jacobolus on Saturday August 31, 2019 @02:04AM (#20844843)
The integers do not form a group under multiplication. As you noticed, the multiplicative inverse of any integer other than 1 or –1 is not an integer.

You might be thinking of the rational numbers (excluding zero).

Re:Anna Karenina Principle by james_s_tayler on Sunday September 01, 2019 @07:43AM (#20851753)
Woops. You're right.

Looks like I need to play Group or Not Group.

https://youtu.be/qvx9TnK85bw

But then even for addition what's the inverse of 0? -0?

Re:Anna Karenina Principle by ulrikrasmussen on Saturday August 31, 2019 @01:22AM (#20844741)
You are thinking of the multiplicative group of integers coprime to some integer n. That set by definition never includes 0.
Re:Anna Karenina Principle by MrQuincle on Saturday August 31, 2019 @07:42AM (#20845748)
Integers form a monoid under multiplication.

PS: A monoid in which each element has an inverse is a group.

Re:Anna Karenina Principle by ZeikJT on Saturday August 31, 2019 @08:20PM (#20849688)
1 is the only A such that X + A = X + 1 :D
Re:Anna Karenina Principle by xondono on Friday August 30, 2019 @09:17PM (#20844074)
But all of them evaluate to true except for zero, thus one code for success, many for failure
Re:Anna Karenina Principle by cgriswald on Saturday August 31, 2019 @10:57AM (#20846635)
That's idiomatic, not an inherent property of the numbers themselves. You're basically arguing that because we do it in one context we do it in another context, but it doesn't answer the question of why.
Re:Anna Karenina Principle by falcor84 on Saturday August 31, 2019 @04:02AM (#20845158)
Well, an interesting fact is that every nonzero rational number has two equal representations in some bases, e.g. 0.999...=1. Zero is then is the only rational number with just one representation.

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

Re:Anna Karenina Principle by cgriswald on Saturday August 31, 2019 @09:15AM (#20846092)
You can represent 0 a countably infinite number of ways: 0 0.0 0.00 0.000 0.0000 ...
Re:Anna Karenina Principle by falcor84 on Saturday August 31, 2019 @03:07PM (#20848209)
Well, the convention in maths is that we never add trailing zeros, since they wouldn't as any information. Unlike in other sciences, where they represent measurement precision.
Re:Anna Karenina Principle by cgriswald on Saturday August 31, 2019 @06:05PM (#20849078)
The same is true of .999... and 1. In any case, it’s an artifact of how we represent numbers, not an property of the numbers themselves.
Re:Anna Karenina Principle by dorgo on Saturday August 31, 2019 @06:30AM (#20845546)
ähmm, no? Counterexample: 1/3

>every nonzero TERMINATING decimal has two equal representations

Re:Anna Karenina Principle by falcor84 on Saturday August 31, 2019 @07:11AM (#20845638)
I mentioned "in some bases". In base 3, it's 0.1 and 0.0222...