Talk:Balanced ternary

message: From the Article (text in italics recently added):
:Donald Knuth has pointed out that truncation and rounding are the same operation in balanced ternary—they produce exactly the same result. Moreover, there is no ambiguity in rounding (a property shared with other odd bases) since the number half is not representable.
Isn't it because there is no representation for 0.5 (mid point) that truncation is the same as rounding. -- Chris Q 15:22, 8 December 2006 (UTC)
replies: text: No. Rounding and truncating is not the same for normal (unbalanced) ternary, even though it doesn't have a representation for 0.5 either. With unbalanced ternary the number 1.2 would get rounded to 2 but truncated to 1. -- Thowllly 01:27, 14 August 2007 (UTC)

text: Knuth repeats his point about truncation in a question about BT floating point notation ("rounding (except during division) is equivalent to truncation"), but it is striking that his "very pleasant system" does not provide for a representation of ½, or any value of the form 1/(2 × 3^n). 2A02:A445:EB91:1:90F2:5620:B1FE:B7F7 (talk) 10:52, 5 April 2019 (UTC)
thread_title:  rounding 

message: The article states, "The quick test for even is the analog of the base ten divide-by-nine test: add up all the digits and repeat until you have a one-digit number; the number is even if the final sum is zero."
It can be stated much more simply than that. A number is even if it has an even number of nonzero digits.
(In general, in any odd base, balanced or ordinary, a number is even if it has an even number of odd digits.)
I'm not sure whether this should be given as an alternative method or whether it should replace the existing one. The general "odd base evenness test" and the "one less than base" division test coincide, making them both reasonable ways to approach the problem. However, I don't feel that the evenness test deserves too much text devoted to it, so if nobody says anything then (provided I don't forget!) I will replace the complicated method with the simple one. MarkC77 02:09, 9 December 2006 (UTC)
thread_title:  Evenness test 

message: Does anyone know what LeRoy Eide's algorithm (mentioned in main article) is?
Ian S 14:19, 27 March 2007 (UTC)
thread_title:  LeRoy Eide's algorithm  

message: I vaguely recall seeing this system attributed to the astronomer Johannes Kepler.  Can anyone confirm or deny anything? Michael Hardy (talk) 17:12, 6 August 2008 (UTC)
thread_title:  Kepler? 

message: Hey, is it just me or does anyone else have these numbers (first sentence in the paragraph on Fractional balanced ternary) display as though they were one half and two halves?  I have checked the actual characters by cut and paste and they are the correct ones but my browser doesn't display them correctly.  I am using IE 6 SP1.
Pedrocelli (talk) 05:01, 5 December 2008 (UTC)
replies: text: I'm using IE7, and I have no problem.--Noe (talk) 09:08, 5 December 2008 (UTC)
thread_title:  Display of one third and two thirds 

message: The example given for coins isn't clear enough in it's relation to balanced ternary.  The relationship to ternary is clear, in that the coin denominations are powers of 3, but I fail to see how any of this system is distinct from a traditional non-balanced ternary.  70.250.238.188 (talk) 16:35, 21 March 2010 (UTC)
replies: text: (delayed reply) My understanding is that both the buyer and seller have exactly one of each coin. The buyer gives the seller the coins corresponding to the positions containing a plus, and then the seller gives back the coins corresponding to the positions containing a minus. For example, if the item costs $7, the buyer would give a $9 and a $1 coin, and receive back a $3 coin. In a pure ternary system, the buyer would instead have to have two of each coin, and the seller would never give change. I'll add an example to the article about this. Dcoetzee 01:19, 23 April 2012 (UTC)
replies: text: To be an exact equivalent of balanced ternary you would have to also stipulate that the seller could not give a coin of the same denomination in change that they had received. -- Q Chris (talk) 08:48, 23 April 2012 (UTC)
replies: text: That is true, although I think it's kind of implied (you wouldn't normally hand someone a coin just to have it handed right back to you - you would just not give it). Dcoetzee 10:49, 23 April 2012 (UTC)
thread_title:  Coins example 

message: It says: "The notation has a number of computational advantages over regular binary, and over traditional ternary. Particularly, the one-digit multiplication table has no carries in balanced ternary, and the addition table has only two symmetric carries instead of three."
But it's not neutral.
evidence                         	Balternary       	Binary   	Ternary
Carry of the multiplication table	w/o              	w/o      	1(2*2=11)
Carry of the addition table      	2(T+T=T1; 1+1=1T)	1(1+1=10)	3(1+2=10;2+1=10;2+2=11)
Actually, the computational advantage of the Balternary is
 
1. the plus-minus consistency
…
2. rounding-truncate equivalence. 
It make things simpler. 
for example, 0.210 + 0.810 
In Balternary, 0.1+1.T=1, 0.1T+1.T1=1, 0.1TT+1.T11=1, 0.1TT1+1.T11T=1,... always 1
But, in Binary, 
0.0+1.0=1, 0.01+0.11=1, 0.010+0.110=1, 0.0011+0.1101=1,... rounding
0.0+0.1≠1, 0.00+0.11≠1, 0.001+0.110≠1, 0.0011+0.1100≠1,...truncate
Orienomesh-w (talk) 14:45, 12 November 2012 (UTC)
replies: text: I think the "makes things simpler" needs a bit of expansion - maybe "truncation automatically rounds" or something like that. -- Q Chris (talk) 14:59, 12 November 2012 (UTC)
thread_title:  Computational advantages  

message: The "compact" representation is Balanced Septemvigesimal. Does this make it relevant to this article? Also is it complete WP:OR, the linked article uses two different symbol mappings to the unreferenced one shown here?
I don't think the compact form adds to understanding in this article, if anything the bracketed Balanced Septemvigesimal in tables like this confused me:
Decimal                                     	Balternary
\sqrt{2}=1.4142135623731...                 	1.11T'1TT'00T'00T'01T'0T0'0T0'0T0'1TT…(1.75T'T2R'RR5...)
\sqrt{3}=1.7320508075689...                 	1T.T1T'T10'T00'00T'T11'00T'0TT'T01'1T0…(2.MNK'TPT'QL6...)
\sqrt{5}=2.2360679774998...                 	1T.1T0'101'010'TTT'1TT'110'10T'TT0'1T1…(2.6A3'F5C'8G7...)
\phi=\frac{\sqrt{5}-1}{2}=0.6180339887499...	φ=1.T0T'T01'TT0'T10'TT1'1T0'011'T10'011…(1.J8G'NH6'4N4...)
Should it be here? -- Q Chris (talk) 14:38, 29 November 2012 (UTC)
replies: text: If you do not like it, just delete it. It's just a predefine item. Can't be viewed as a Balanced Septemvigesimal. -Orienomesh-w (talk) 10:38, 30 November 2012 (UTC)
thread_title:  IS the compact representation [[WP:OR]] and is it relevant 

message: I dislike the new (Jan.25) arrangement of the number table: it visually suggests a (false) parallelism between numbers that differ by 5. What was wrong with the old one? —Tamfang (talk) 09:05, 9 February 2013 (UTC)
thread_title:  rows vs columns 

message: "In the balanced ternary system, the value of a digit n places left of the radix point the product of the digit and 3n" What on earth is that supposed to mean? Hammerfrog (talk) 10:54, 12 May 2013 (UTC)
thread_title:  Gobledygook. 

message: The repeated fraction example after the table if BT decimals is not well explained and is using material (multiplication) that isn't explained until later in the article. It just gives a parenthetical note of an identity with a decimals value, but no explanation of why that identity is important or where the method/formula to convert the repeated decimal to fraction comes from. It needs to be fleshed out maybe in it's own section later in the article once multiplication and division are explained. Rs180216 (talk) 07:17, 7 September 2017 (UTC)
replies: text: Agree, the fraction section is hard to understand. I have added a link to the decimal method but the section could do with expansion and more detailed explanation by someone more knowledgeable than me. -- Q Chris (talk) 07:47, 8 September 2017 (UTC)
thread_title:  Repeated fraction example 

message: Remarks about biased numeral system (in "Conversion from ternary") confuse representation with implementation and are essentially vacuous.
"The basic operations—addition, subtraction, multiplication, and division—are done as in regular ternary" is obviously false; moreover, BT subtraction (as a "basic operation", i.e. not done as adding the inverse) and division are conceptually weird and more needs to be said about them.
"and an arithmetic shift right of a balanced ternary number is the equivalent of division by a (positive, integral) power of 3." But only in two thirds of the cases the arithmetic right shift gives the same result in both balanced ternary and ordinary ternary, so what is this quote supposed to mean?2A02:A445:EB91:1:717F:8142:3278:D14F (talk) 12:00, 18 March 2020 (UTC)
thread_title:  General =

message: It appears that the whole paragraph contains severe misinformation.
# A valuation is DEFINED to map "numbers" (elements) to non-negative real numbers, and does not evaluate a string into the integers.
# There is nothing "canonical".
# The begins of the strings are at index 0 to the right, the ends are to the left at index n.
# You seem to assume v_{2}(\rm T) = f(\rm T) = -1. If you do so, then the map is indeed surjective.
# But then the odd integer 3 has at least the 5 representations 3 = v_2(11) = v_2(10\rm T) = v_2(1\rm T 1) = v_2(1\rm T 0\rm T) = v_2(1\rm T \rm T 1); and the odd integer 1 1 = v_2(1) = v_2(1\rm T) = v_2(1\rm T \rm T) = v_2(1\rm T \rm T \rm T) = v_2(1\rm T \rm T \rm T \rm T ).
# There is absolutely nobody who uses the v_2 of this section. So you need not give a reason for that.
So I removed the whole section "Contrast to base 2 integer evaluation" and tried to rescue some of the remaining paragraph. −Nomen4Omen (talk) 09:30, 31 October 2020 (UTC)
thread_title:  Ternary integer valuation 

message: As per 10/31/2020 this article is FUBAR. Umpteenth mathematical topic that has been totally "fringified" into an unannotated, unstructured, unbalanced set of comments. This page should be identified for deletion for reasons of vandalism, lack of reliable sources and lack of notability.2A02:A445:EB91:1:905B:5A74:BB35:1717 (talk) 12:53, 1 November 2020 (UTC)
thread_title:  Page deletion 

message: I  the claim about the need for signed and unsigned variants of multiplication operations, and removed the  template.  I would be interested to see any unbalanced architecture that can achieve similar efficiency to a balanced representation for signed multiplication for multi-word arguments without signed/unsigned variants of the multiplication instruction, even disregarding packing inefficiencies such as ignoring the loss of a most significant bit. (Courtesy ping: .)  —Quondum 21:11, 28 December 2020 (UTC)
replies: text: It's still dubious. The only differences between signed and unsigned multiplication for binary involve minor variations in carrying that do not require duplicate hardware. If CPU hardware were really a concern, they would be designed purely for signed 2's complement binary. The fact that they aren't suggests that your rationale carries no weight with actual CPU designers. —David Eppstein (talk) 21:21, 28 December 2020 (UTC)
replies: text: I agree with David. I don't think that the unsigned types are provided for efficiency reasons. The reason is more alongside space. In fact, if you want to construct support for extremely long integers (signed or unsigned) the first word with the highest significance will be signed or unsigned, but the following words with lesser significance will all be unsigned, just as the subsequent bits in a single word integer. And the distinction between signed and unsigned is obsolete when the type is balanced. –Nomen4Omen (talk) 21:33, 28 December 2020 (UTC)
replies: text: Have you ever tried to implement a multi-word signed multiply with only one variant of instruction?  Note that duplication of hardware is not being claimed; I agree that there are only minor differences in the ways the same hardware would be applied.  It is the fact that how the carry logic operates must be selected that forces multiple variants of instruction.  This is not of significance in the cost of the hardware (it might just be a few logic gates), but rather in the greater number of instructions needed.  The claim is that without the additional instructions, the same efficiency cannot be achieved.  —Quondum 21:36, 28 December 2020 (UTC)
replies: text: Do you have a published source for your argument that a reduced number of arithmetic instructions leads to any actual design efficiencies, or is this all just original research? —David Eppstein (talk) 22:50, 28 December 2020 (UTC)
replies: text: I think you may have me wrong.  I agree with your removal of claims of comparative advantage with other representations; I find this article to be overly heavy with potentially OR claims of advantage.  In response to your question, I make no claim that what I say is sourced.  My experience is what I base my comments on (and I have no intention of including this in the article; I had simply tried to clarify what was already there): for example, it may be an issue in a multiply-heavy instruction set (as with the Motorola 56000, where it appears that at least 25% of the instruction set encodings are devoted to signed multiply instruction variants, with the effect that even a single bit spent on encoding unsigned variants would have forced significant design compromises; I think as a consequence multi-precision multiply routines were perforce comparatively inefficient).  More generally, to write a loop in which the last iteration only uses a signed variant will increase the code size slightly, which in turn could impact cache performance.  However, since this is no longer seems to pertain to the content of the article, I suggest that we drop it.  —Quondum 00:43, 29 December 2020 (UTC)
thread_title:  Efficiency of multiplication 

message: The lede and the (weird) following section only discuss balance ternary integers. Fractions emerge unheralded in the remainder of the text. (2A02:A440:948D:1:A55A:B9E4:F071:A240 (talk) 10:03, 11 November 2023 (UTC)
thread_title:  Numeral system