Increase pi-approx.ang example accuracy
This commit is contained in:
parent
8d9138479d
commit
449f7cd815
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
# see: https://en.wikipedia.org/wiki/Basel_problem
|
# see: https://en.wikipedia.org/wiki/Basel_problem
|
||||||
|
|
||||||
# The amount of terms
|
# The amount of terms
|
||||||
terms := 10000
|
terms := 100000000
|
||||||
|
|
||||||
# The running sum of terms
|
# The running sum of terms
|
||||||
tot := 0
|
tot := 0
|
||||||
|
|
@ -29,7 +29,7 @@ func abs(x) {
|
||||||
# newton's method.
|
# newton's method.
|
||||||
# see: https://en.wikipedia.org/wiki/Newton's_method
|
# see: https://en.wikipedia.org/wiki/Newton's_method
|
||||||
# The required accuracy
|
# The required accuracy
|
||||||
SQRT_ACC := 0.00001
|
SQRT_ACC := 0.00000001
|
||||||
func sqrt(x) {
|
func sqrt(x) {
|
||||||
pg := 0 # previous guess
|
pg := 0 # previous guess
|
||||||
g := 1 # current guess
|
g := 1 # current guess
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue