Increase pi-approx.ang example accuracy

This commit is contained in:
Neemek 2025-01-03 23:16:03 +01:00
parent 8d9138479d
commit 449f7cd815
Signed by: neemek
GPG key ID: 28360A8951CD0E9B

View file

@ -4,7 +4,7 @@
# see: https://en.wikipedia.org/wiki/Basel_problem
# The amount of terms
terms := 10000
terms := 100000000
# The running sum of terms
tot := 0
@ -29,7 +29,7 @@ func abs(x) {
# newton's method.
# see: https://en.wikipedia.org/wiki/Newton's_method
# The required accuracy
SQRT_ACC := 0.00001
SQRT_ACC := 0.00000001
func sqrt(x) {
pg := 0 # previous guess
g := 1 # current guess