Standard library / math
math.Ilogb()
Binary exponent as an integer; special sentinel values for zero, infinities and NaN. Expected stdout: '3\n'.
Formal Syntax & Structure
go syntaxgo
func Ilogb(x float64) intParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | float64 | First input operand (or sole input if unary). |
Return Value
int
Binary exponent as an integer; special sentinel values for zero, infinities and NaN.
Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Println(math.Ilogb(8))}