An open API service indexing awesome lists of open source software.

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

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_