Standard library / math/cmplx
cmplx.IsNaN()
True if either component is NaN and neither component is infinite. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func IsNaN(x complex128) boolParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | complex128 | First input operand (or sole input if unary). |
Return Value
bool
True if either component is NaN and neither component is infinite.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/cmplx")
func main() { fmt.Println(cmplx.IsNaN(cmplx.NaN()))}