weight.rdivide(w)

w // weight

The right quotient of weight by w. Written weight / w, or sometimes $w^{-1}(\mathit{weight})w$. Is equivalent to left quotient on commutative weightsets.

See also:

Examples

In [1]:
import sys
import vcsn
weight = vcsn.context('lal, q').weight
weight('3').rdivide(weight('4'))
Out[1]:
$\frac{3}{4}$
In [2]:
weight('3') / weight('4')
Out[2]:
$\frac{3}{4}$
In [3]:
weight('3') // weight('4')
Out[3]:
$\frac{4}{3}$
In [4]:
weight('2') / weight('4')
Out[4]:
$\frac{1}{2}$
In [5]:
try:
    weight('4') / weight('0')
except Exception as e:
    print(e, file=sys.stderr)
Q: div: division by zero