4 ms·
Redundant number systems are a really great topic. https://en.wikipedia.org/wiki/Redundant_binary_representation https://en.wikipedia.org/wiki/Redundant_binary
by steerablesafe 6y ago
Redundant number systems are a really great topic.
https://en.wikipedia.org/wiki/Redundant_binary_representation https://en.wikipedia.org/wiki/Redundant_binary_representatio...
https://en.wikipedia.org/wiki/Carry-save_adder https://en.wikipedia.org/wiki/Carry-save_adder
http://lux.dmcs.pl/csII/ca2_RedundantNS.pdf http://lux.dmcs.pl/csII/ca2_RedundantNS.pdf
I have an arbitrary precision arithmetic library in my mind that represents numbers as streams of digits starting from the most significant digit. A redundant numeric representation could avoid unbounded backtracking (think flipping between 0.9999... and 1.0000... in a regular representation) and could guarantee forward progress for the generated digits.
- jjoonathan 6y agoI love that the same trick works for human brains as well as CPUs. Your brain already pays the price to represent numbers as high level abstract concepts rather than tightly packed fields. Just let the digits overflow, then clean them up later. 14*14 140 + 14*4 140 + 4(16) <-- 4 tens + 16 ones 18(16) 196
- HeWhoLurksLate 6y agoI did the same thought and broke them up a little differently: 14*14 7*7*2*2 [b/c 14 = 2*7] 49*2*2 98*2 196 For whatever reason, my brain likes using twos (and powers of it), so I play to that strong spot wherever possible. EDIT: as noted below, I made a mistake (7·7=49,not 47,) and carried it halfway through my solution. Oops.
- iso947 6y ago7x7 isn’t 47, and 94x2 isn’t 196
- dr_zoidberg 6y agoDespite that, the breakup does hold up the correct calculation: 14 * 14 (7 * 2) * (7 * 2) 7 * 7 * 2 * 2 49 * 2 * 2 98 * 2 196 And on my side, 49 * 2 quickly resolves to "a hundred minus 2" (because 49 * 2 = (50 - 1) * 2), and pretty much the same for 196 (200 - 4).
- HeWhoLurksLate 6y agoWoops, fixed it. Thanks for noticing!
- jjoonathan 6y agoYeah, for sure, if the numbers break easily into small factors, that's the way to go. Redundant numbers still work even when the factors are few, large, or difficult to calculate, however: 17 * 17 170 + 17*7 170 + 07(49) 1(14)(49) 24(49) 289
- jchook 6y agoFor my undergrad thesis I studied “Fibinary”, or Fibonacci coding. You can think of it like “base phi”, using Fibonacci numbers as the place values, and only 0,1. The “normalized” representation, called Zeckendorf representation, perfectly packs error correction into the binary, as it ensures no number will ever have consecutive ones. It also has applications in data compression. https://en.m.wikipedia.org/wiki/Fibonacci_coding https://en.m.wikipedia.org/wiki/Fibonacci_coding