Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45860
Kernel: Python 3

weight.ldivide(w)

w // weight

The left quotient of w by weight. Written weight \ w, or sometimes (weight)1w(\mathit{weight})^{-1}w. Is equivalent to right quotient on commutative weightsets. Beware that the notation lhs // rhs is somewhat misleading, and corresponds to lhs \ rhs, i.e. lhs is the divisor, and rhs the dividend.

See also:

Examples

import sys import vcsn weight = vcsn.context('lal, q').weight weight('3').ldivide(weight('4'))

43\frac{4}{3}

weight('3') // weight('4')

43\frac{4}{3}

weight('3') / weight('4')

34\frac{3}{4}

weight('2') // weight('4')

22

try: weight('0') // weight('4') except Exception as e: print(e, file=sys.stderr)
Q: div: division by zero