Tertiary Arithmetics

  • Thread starter Uke
  • Start date
  • #1
Uke
3
0

Main Question or Discussion Point

Is there any arithmetic operation with three operands (or arguments), such that it cannot be calculated by a sequence of common binary and unary operations? This is not a homework problem or anything like that, I am just curious.
 

Answers and Replies

  • #2
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
17
What precisely do you mean by 'arithmetic' here? Anyways, if you're simply talking about functions, then the answer is no, because you can encode a pair of numbers into a single number, and build your ternary function from the two binary functions:

1. Encode the first two numbers into a single number
2. Take the output of (1) and the third number, unpack (1) and compute the ternary function


An example of how to do the encoding would be to alternate taking digits from your two numbers. For example,

encode(12345, 678) = 1020364758

Incidentally, the word is 'ternary'
 

Related Threads for: Tertiary Arithmetics

  • Last Post
Replies
5
Views
629
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
8
Views
2K
  • Last Post
Replies
5
Views
2K
  • Last Post
3
Replies
58
Views
7K
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
15
Views
3K
  • Last Post
Replies
7
Views
3K
Top