Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Balanced ternary
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Square roots and cube roots== The process of extracting the [[square root]] in balanced ternary is analogous to that in decimal or binary. :<math>(10\cdot x+y)^{\mathrm{1T}}-100\cdot x^{\mathrm{1T}}=\mathrm{1T0}\cdot x\cdot y+y^{\mathrm{1T}}= \begin{cases} \mathrm{T10}\cdot x+1, & y=\mathrm{T} \\ 0, & y=0 \\ \mathrm{1T0}\cdot x+1, & y=1 \end{cases} </math> As in division, we should check the value of half the divisor first. For example, 1. 1 1 T 1 T T 0 0 ... _________________________ β 1T 1<1T<11, set 1 β 1 _____ 1Γ10=10 1.0T 1.0T>0.10, set 1 1T0 β1.T0 ________ 11Γ10=110 1T0T 1T0T>110, set 1 10T0 β10T0 ________ 111Γ10=1110 T1T0T T1T0T<TTT0, set T 100T0 βT0010 _________ 111TΓ10=111T0 1TTT0T 1TTT0T>111T0, set 1 10T110 β10T110 __________ 111T1Γ10=111T10 TT1TT0T TT1TT0T<TTT1T0, set T 100TTT0 βT001110 ___________ 111T1TΓ10=111T1T0 T001TT0T T001TT0T<TTT1T10, set T 10T11110 βT01TTTT0 ____________ 111T1TTΓ10=111T1TT0 T001T0T TTT1T110<T001T0T<111T1TT0, set 0 β T Return 1 ___________ 111T1TT0Γ10=111T1TT00 T001T000T TTT1T1100<T001T000T<111T1TT00, set 0 β T Return 1 _____________ 111T1TT00*10=111T1TT000 T001T00000T ... Extraction of the cube root in balanced ternary is similarly analogous to extraction in decimal or binary: :<math>(10\cdot x+y)^{10}-1000\cdot x^{10}=1000\cdot x^{\mathrm{1T}}\cdot y+100\cdot x\cdot y^{\mathrm{1T}}+y^{10}= \begin{cases} \mathrm{T000}\cdot x^{\mathrm{1T}}+100\cdot x+\mathrm{T}, & y=\mathrm{T}\\ 0, & y=0\\ 1000\cdot x^{\mathrm{1T}}+100\cdot x+1, & y=1 \end{cases} </math> Like division, we should check the value of half the divisor first too. For example: 1. 1 T 1 0 ... _____________________ Β³β 1T β 1 1<1T<10T,set 1 _______ 1.000 1Γ100=100 β0.100 borrow 100Γ, do division _______ 1TT 1.T00 1T00>1TT, set 1 1Γ1Γ1000+1=1001 β1.001 __________ T0T000 11Γ100 β 1100 borrow 100Γ, do division _________ 10T000 TT1T00 TT1T00<T01000, set T 11Γ11Γ1000+1=1TT1001 βT11T00T ____________ 1TTT01000 11TΓ100 β 11T00 borrow 100Γ, do division ___________ 1T1T01TT 1TTTT0100 1TTTT0100>1T1T01TT, set 1 11TΓ11TΓ1000+1=11111001 β 11111001 ______________ 1T10T000 11T1Γ100 β 11T100 borrow 100Γ, do division __________ 10T0T01TT 1T0T0T00 T01010T11<1T0T0T00<10T0T01TT, set 0 11T1Γ11T1Γ1000+1=1TT1T11001 β TT1T00 return 100Γ _____________ 1T10T000000 ... Hence {{radic|2|3}} = 1.259921<sub>dec</sub> = 1.1T1 000 111 001 T01 00T 1T1 T10 111<sub>bal3</sub>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)