Standard library / math/big
big.Float.Mul()
Multiply using destination precision and rounding; zero times infinity panics with ErrNaN. This method writes to the receiver (use a separate destination to preserve inputs when needed). Expected stdout: '3.125\n'.
Formal Syntax & Structure
go syntaxgo
func (z *Float) Mul(x, y *Float) *FloatParameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | *Float | Numeric operand supplied to this method. |
| y | *Float | Numeric operand supplied to this method. |
Return Value
*Float
Returns the result described above; see the example for the observed behavior.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/big")
func main() { fmt.Println(new(big.Float).Mul(big.NewFloat(1.25), big.NewFloat(2.5)))}