Source/Packages

Std.Word

packages/foundation/standard/src/Std/Word.alpha

1,783 lines192 declarations64.2 KiBSHA-256 27bf8c3f30ee

def · lines 1609–1635

stdI32DivRemWrapping

Full file
1609def stdI32DivRemWrapping =
1610  (lambda unrestricted dividend : (family StdI32) .
1611    (lambda unrestricted divisor : (family StdI32) .
1612      (eliminate
1613        StdDivision
1614        (lambda unrestricted current : (family StdDivision (family ModelWord32)) .
1615          (family StdDivision (family StdI32)))
1616        (stdU32DivRem (stdI32Magnitude dividend) (stdI32Magnitude divisor))
1617        (branch
1618          StdDivisionSucceeded
1619          quotient
1620          remainder
1621          .
1622          (constructor
1623            StdDivision
1624            StdDivisionSucceeded
1625            (family StdI32)
1626            (stdI32FromWord
1627              (stdU32NegateIf
1628                (stdFlagXor (stdI32IsNegative dividend) (stdI32IsNegative divisor))
1629                quotient))
1630            (stdI32FromWord (stdU32NegateIf (stdI32IsNegative dividend) remainder))))
1631        (branch
1632          StdDivisionFailed
1633          error
1634          .
1635          (constructor StdDivision StdDivisionFailed (family StdI32) error)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.