Skip to content

Code to calculate the golden ratio (phi) to a high level of precision

License

Notifications You must be signed in to change notification settings

joaojcorreia/Calculate-phi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculate Φ

The goal of this repository is to present a few algorithms that allow you to calculate Φ (the golden ration) with a high level of precision.

In order to do this the Python Decimal module is used. The module allows one to define the number decimal spaced used in the calculation. Obviously the greater the number of decimal spaces, the longer the calculation of by will take.

Due to the high level of precision required for the calculation of factorials and square roots, the Math module is also used in most algorithms.


Logic behind the calculation

All the presented algorithms are interactive processes, that increase the precision and the number of decimal spaces, the more loops the calculation is run.

The algorithms have been setup in a away that the while loop ends once further interactions do not change the final number (for the number of decimal spaces selected).


Algorithms used


To dos

About

Code to calculate the golden ratio (phi) to a high level of precision

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages