Source/Packages

Std.Word

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

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

def · lines 1543–1569

stdI64DivRemWrapping

Full file
1543def stdI64DivRemWrapping =
1544  (lambda unrestricted dividend : (family StdI64) .
1545    (lambda unrestricted divisor : (family StdI64) .
1546      (eliminate
1547        StdDivision
1548        (lambda unrestricted current : (family StdDivision (family ModelWord64)) .
1549          (family StdDivision (family StdI64)))
1550        (stdU64DivRem (stdI64Magnitude dividend) (stdI64Magnitude divisor))
1551        (branch
1552          StdDivisionSucceeded
1553          quotient
1554          remainder
1555          .
1556          (constructor
1557            StdDivision
1558            StdDivisionSucceeded
1559            (family StdI64)
1560            (stdI64FromWord
1561              (stdU64NegateIf
1562                (stdFlagXor (stdI64IsNegative dividend) (stdI64IsNegative divisor))
1563                quotient))
1564            (stdI64FromWord (stdU64NegateIf (stdI64IsNegative dividend) remainder))))
1565        (branch
1566          StdDivisionFailed
1567          error
1568          .
1569          (constructor StdDivision StdDivisionFailed (family StdI64) 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.