Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

Idiom #236 Large quotient

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

import fractions
q = fractions.Fraction(a, b)
import "math/big"
q := new(big.Rat)
q.SetString(str)
import "math/big"
q := new(big.Rat)
q.SetFrac(a, b)
import "math/big"
q := big.NewRat(a, b)
q = Rational(a, b)

New implementation...