Is Negative Infinity in Go

Posted by yhuang
Public (Editable by Users)
Go
Edit
package main

import (
  "fmt"
  "math"
)

func main() {
  posInf := math.Inf(-1)
  fmt.Println(math.IsInf(posInf, -1))
}