https://github.com/cuadernin/sqrtsimulation
Computes the nth root using Monte Carlo simulation
https://github.com/cuadernin/sqrtsimulation
dart montecarlo montecarlo-simulation nth-root simulation square-root
Last synced: 2 months ago
JSON representation
Computes the nth root using Monte Carlo simulation
- Host: GitHub
- URL: https://github.com/cuadernin/sqrtsimulation
- Owner: Cuadernin
- Created: 2021-02-03T23:47:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-19T03:54:46.000Z (about 5 years ago)
- Last Synced: 2024-05-17T16:59:19.691Z (about 2 years ago)
- Topics: dart, montecarlo, montecarlo-simulation, nth-root, simulation, square-root
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nth root simulation
Computes the nth root using monte carlo simulation in Python (GUI).
## Problem to solve 📄
Since we need to find the umpteenth root of any number, then, be n the number to calculate, we create an interval [0, p] where p belongs to [sqrt (n-1), sqrt (n+1)]. We simulate the throwing of N darts in the initial interval and return the ratio of darts that belongs to interval where p is. That ratio is the searched value.
## Input 📋
* Numero de dardos: _number of darts_
* Numero a aproximar: _number to which the root will be calculated_
* Indice de la raiz: _root grade_
* Grafica: _graph_
* Error porcentual: _percentage error_
## Output 📦
* La aproximacion es: _Simulated value_
* Error porcentual: _percentage error_
* Valor real: _real value_