Standard library / math

math.Ln2

Natural logarithm of two. Expected stdout: '0.693147\n'.

Formal Syntax & Structure

go syntaxgo
const Ln2    = 0.693147180559945309417232121458176568075500134360255254120680009

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Printf("%.6f\n", math.Ln2)}
Go Reference