Logo

Programming-Idioms

  • Kotlin

Idiom #236 Large quotient

Initialize a quotient q = a/b of arbitrary precision. a and b are large integers.

import "math/big"
q := new(big.Rat)
q.SetString(str)

str is a quotient string including numerator, slash, denominator.

New implementation...