177 points · by int_10h · 8y ago · 69 comments
However, I was always willing to answer nontrivial questions, and even convert numbers to/from negabinary to help them. (The program used the Schroeppel2 implementation, to prevent them from getting too much of a clue if they somehow managed to find its source code)
I'm not sure those would be enough, but just inspecting the digit-wise patterns would get you pretty far. Correctly interpreting the sequence is far harder!
https://oeis.org/search?q=1%2C+6%2C+7%2C+4%2C+5%2C+26%2C+27&...
Interestingly, normal binary has the same pattern, but with different offsets for the start of the sequence.
* https://en.wikipedia.org/w/index.php?title=-0&diff=25603603&...
* https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletio...
Although it smells like a design flaw (which negabinary conveniently doesn't have)
> 1/(-0)
-Infinity
> 1/0
Infinity
> Object.is(0, -0)
false
Of course = doesn't actually test equality in javascript. == reports -0 as being equal to +0, but Object.is reports them as different."You have 12 coins that all look exactly the same. One is counterfeit and is either heavier or lighter than the other 11. With a balance beam scale, isolate the counterfeit coin in three moves."
Any uses for Negative-base systems?
Move 1: weigh 6 coins vs 6 coins. Isolate the heavier set for the next move. Move 2: weigh 3 coins vs 3 coins. Isolate the heavier set for the next move. Move 3: weigh any two of the 3 remaining coins. If one is heavier, that is the counterfeit. Otherwise (if coins are equal in weight) the remaining coin is counterfeit.
> One is counterfeit and is either heavier or lighter
It turned out the counterfeit was lighter and you discarded it after the first weighing.
This was a fun one to work out on paper though.
― Aldous Huxley
- Obfuscation.
- Storing signed numbers in unsigned fields (nah, not really).
So this may eventually find a use, likely with higher-dimensional math.
https://en.m.wikipedia.org/wiki/Fundamental_theorem_of_algeb...
The first use of negative roots was to find the (real) roots of certain polynomials. They were considered a mathemathical hack: useful, but specious on their own. And then it turned out that if you take them on their own terms, they're fantastically useful.
So there's no possible way this could be useful for "higher dimensional math" or anything, because there's no entity being added here. Higher dimensional math already uses numbers. At most there might be one or two concepts that might in some manner if you squint hard enough could be better represented by negative base numbers, but even then the positive base representation would probably still be how people actually understood it.
Highly unlikely, but fun to think about.
I think the ideal wikipedia page for this kind of thing has a 'Properties' section from which to start thinking about this
i^1 = i
i^2 = -1
i^3 = -i
i^4 = 1