Standard library / math
math.Ldexp()
Multiplies frac by 2 raised to exp, inverse of Frexp decomposition. Expected stdout: '12\n'.
Formal Syntax & Structure
go syntaxgo
func Ldexp(frac float64, exp int) float64Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| frac | float64 | Fractional significand. |
| exp | int | Binary exponent. |
Return Value
float64
Multiplies frac by 2 raised to exp, inverse of Frexp decomposition.
Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Println(math.Ldexp(0.75, 4))}