How to find the binary exponent of a float64 number in Go

1 Answer

0 votes
package main

import (
	"fmt"
	"math"
)

func main() {
    x := 10.0
    
	result := math.Logb(x)
	
	fmt.Print(result)
}





/*
run:
 
3
 
*/

 



answered Jun 11, 2023 by avibootz

Related questions

1 answer 82 views
82 views asked Nov 10, 2024 by avibootz
1 answer 176 views
1 answer 168 views
1 answer 164 views
164 views asked Aug 17, 2020 by avibootz
1 answer 166 views
...