i'm trying to make a program that calculates the value of pi and print it on the terminal, but only part of it shows on the screen
package main
import (
"fmt"
)
func gregorypi() float64 {
numerator := 1.0
divisor := 3.0
var result float64
for i := 0; i <= 100000000; i++ {
if i%2 == 0 {
result += numerator / divisor
divisor += 2
} else {
result -= numerator / divisor
divisor += 2
}
}
return (4 * (1 - result))
}
func main() {
fmt.Sprint(gregorypi())
}
the output is: 3.1415926435897683
How do i make so the entire value appears?
If it helps answering the question: the formula that i'm using is the Gregory-Leibniz one