I'm just going through tutorials of GoLang because I'm curious to learn a more general language (only know javascript). Tut
I dont understand whats happening with %g and math.Nextafter
means? After reviewing the documentation it helps little.
Question:
Could anyone give me a better overview of the %g
syntax and nextafter()
method; perhaps a digestible usecase?? Here's links to documentation:fmt // nextAfter
package main
import (
"fmt"
"math"
)
func main() {
fmt.Printf("Now you have %G problems.",
math.Nextafter(2, 3))
}