Standard library / math/big

big.Int.Mul()

Stores exact product in receiver, limited by available memory. Expected stdout: '42\n'.

Formal Syntax & Structure

go syntaxgo
func (z *Int) Mul(x, y *Int) *Int

Parameters & Attributes

NameTypeDescription
x*IntFirst input operand (or sole input if unary).
y*IntSecond input operand.

Return Value

*Int

Stores exact product in receiver, limited by available memory.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/big")
func main() {  fmt.Println(new(big.Int).Mul(big.NewInt(6), big.NewInt(7)))}
Go Reference