Cookies management by TermsFeed Cookie Consent
Russia has invaded Ukraine and already killed tens of thousands of civilians, with many more raped or tortured. It's a genocide. We need your help. Let's fight back against the Russian regime.
Help Ukraine! Fight the Russian regime!

🍩 Get Pi constant in Go

shorts numbers math

Please consider supporting us by disabling your ad blocker

To get the value of the Pi (π) constant in Go, use the mathematical constant math.Pi from the standard library math package.

package main

import (

func main() {
    fmt.Printf("%.48f", math.Pi)



🧊 Cube root in Go

shorts numbers math

🟦 Square root in Go

shorts numbers math

🍰 The maximum and minimum value of the int types in Go

shorts numbers math