Golden ratio base useful? Easy logarithm in phinary system

In summary, the conversation discussed the potential use of the Golden ratio base, also known as the phinary system, and how it can be used in arithmetic calculations. The speaker shared their algorithm for calculating logarithms in base phi and discussed the ease of converting back to base 10 or base 2. They also mentioned the interesting property of being able to calculate 1/x quickly in phinary and the potential of using it in calculations. The conversation also touched on the idea of using the Golden ratio as a new base and its potential impact on studies of logarithms.
  • #1
Gerenuk
1,034
5
I was wondering if the Golden ratio base (phinary system) has any use somewhere and if arithmetics with it is easy?

I programmed a surprisingly simple algorithm to calculate the logarithm yielding digits in base phi using nothing more than 2 multiplications/divisions per result digit. Can it be useful?

Here the python programm if you want to see:
Code:
phi=(sqrt(5)+1)/2
base=2
digits=5
totalDigits=30

a0,b0=1/base**(phi**digits),base**(phi**(digits-1))

def logPhinary(x):
  a,b=a0,b0
  result=""
  x*=a
  switch=0
  for i in range(totalDigits):
    if switch==0:
      a*=b
      if x > 1:
        result+="1"
        b*=a
        x*=a
      else:
        switch=1
        x/=a
    else:
      b*=a
      if x > 1:
        result+="1"
        a*=b
        x/=b
      else:
        switch=0
        x*=b
    result+="0"
  return result[0:digits+1]+"."+result[digits+1:] #insert decimal point
 
Mathematics news on Phys.org
  • #2
how difficult is it to convert to base 10 or base 2? and vice versa.

i found it especially interesting that 1/0 is (apparently) easy to calculate. doesn't that mean that division can be done as quickly as multiplication?

are there lots of irrational bases that have these properties or is (1+ sqr(5))/2 unique?
 
Last edited:
  • #3
granpa said:
how difficult is it to convert to base 10 or base 2? and vice versa.

You mean to convert the result of the logarithm (which is in base phi) to binary again?
Haven't checked yet. Just learned about them and noticed that logarithm should be quite easy.

Maybe one can stay phinary for a while in calculations :-)
 
  • #4
granpa said:
i found it especially interesting that 1/0 is (apparently) easy to calculate. doesn't that mean that division can be done as quickly as multiplication?
Actually there are ways to avoid division in my algorithm, but I thought division and multiplication are equally complex for floats. Not sure about that though...
 
  • #5
well I know that there are tricks that make multiplication quite fast. I was assuming that division would necessarily be slower.
 
  • #6
division is slower
 
  • #7
actually calculating 1/x isn't any faster in phinary.

the result of your function is in phinary. what is the input to the function?
 
  • #8
OK, then here is the algorithm without division (for performance unfolding of the variable swapping can be also done)
Code:
from math import *
phi=(sqrt(5)+1)/2
base=2
digits=5
totalDigits=30
x=100
a0,b0,y0=1/base**(phi**digits),base**(phi**(digits-1)),base**(phi**digits)

def logPhinary(x):
  a,b,y=a0,b0,y0
  result=""
  while 1:
    while x>y:
      result+="10"
      a*=b
      b*=a
      x*=a
    a,b,x,y=b,a,-y,-x
    result+="0"
    b*=a
    x*=b
    if len(result)>=totalDigits: break
  return result[0:digits+1]+"."+result[digits+1:]

The input can be any system, where you are able to store the initial values a0,b0,y0, do multiplications and compare. So probably the internal machine binary is best.
 
  • #9
If you are still interested in this, there's an interesting passage in a book called the Modulor 2 by Le Corbusier, he was interested in the golden ratio as a tool to dictate design, but he was looking for people to affirm his ideas, so he asked some mathematicians to look at what he did. In the passage a mathematician ( I can find his name for you if you want) wrote about how the golden ratio may become a the new base to use - how the study and analysis of logarithm were largely forgotten after 1900, especially after people new topics in physics prioritized theoretical physics and quantum mechanics - and how maybe the logarithm of the golden ratio may revive studies in them.
 
  • #10
The Golden ratio doesn't help to study logarithms directly - I mean not the algebra.
But calculating the digits might be easy. I couldn't think of an overall performance increase in calculations though, as the phinary system isn't easy in other contexts.
 

1. What is the golden ratio base?

The golden ratio base is a number system where the base is equal to the golden ratio, approximately 1.61803398875. This means that the numbers are represented in terms of powers of the golden ratio, rather than powers of 10 like in our traditional decimal system.

2. How is the golden ratio base useful?

The golden ratio base has been found to have many mathematical and practical applications. It can simplify certain calculations, such as multiplication and division, and has been used in fields such as computer science, architecture, and music theory.

3. What is the connection between the golden ratio base and logarithms?

In the golden ratio base, the logarithm function is simplified and easier to use compared to traditional logarithms. This is because the logarithm of a number in the golden ratio base is simply the number itself, rather than needing to use a logarithm table or calculator.

4. How is the golden ratio base related to the phinary system?

The phinary system is a base-2 number system, similar to binary, but with a twist. Instead of using powers of 2, it uses powers of the golden ratio. This means that numbers in the phinary system can be converted to the golden ratio base, making calculations even simpler.

5. Is the golden ratio base widely used?

Currently, the golden ratio base is not widely used in everyday calculations. However, it has been studied and researched extensively by mathematicians and scientists, and has potential for use in various fields in the future.

Similar threads

  • General Math
Replies
1
Views
1K
Replies
12
Views
942
Replies
11
Views
491
Replies
4
Views
416
  • General Math
Replies
3
Views
1K
Replies
2
Views
1K
Replies
7
Views
1K
Replies
3
Views
1K
Replies
5
Views
2K
Replies
2
Views
2K
Back
Top