Standard library / math/cmplx

cmplx.IsInf()

True if either component is infinite. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func IsInf(x complex128) bool

Parameters & Attributes

NameTypeDescription
xcomplex128First input operand (or sole input if unary).

Return Value

bool

True if either component is infinite.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/cmplx")
func main() {  fmt.Println(cmplx.IsInf(cmplx.Inf()))}
Go Reference