Skip to contents

Schoolbook multiplication carrying row by row, which keeps every intermediate below \(10^{12} + 10^6\) and so exactly representable as a double.

Usage

morie_big_mul(a, b)

Arguments

a, b

Values coercible by morie_bigint().

Value

A morie_bigint.

Examples

a <- morie_bigint("123456789")
b <- morie_bigint("987654321")
as.character(morie_big_mul(a, b))
#> [1] "121932631112635269"