definition: |
quotRemInteger :: BinInt -> BinInt -> (BinInt, BinInt) quotRemInteger _ Zero = failed -- division by zero is not defined quotRemInteger Zero (Pos _) = (Zero, Zero) quotRemInteger Zero (Neg _) = (Zero, Zero) quotRemInteger (Pos x) (Pos y) = quotRemNat x y quotRemInteger (Neg x) (Pos y) = let (d, m) = quotRemNat x y in (neg d, neg m) quotRemInteger (Pos x) (Neg y) = let (d, m) = quotRemNat x y in (neg d, m) quotRemInteger (Neg x) (Neg y) = let (d, m) = quotRemNat x y in (d , neg m) |
demand: |
arguments 1 2 |
deterministic: |
deterministic operation |
documentation: |
--- Quotient and Remainder, truncated against zero |
failfree: |
<FAILING> |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{({Zero},{Pos}) |-> {(,)} || ({Pos},{Pos}) |-> {(,)} || ({Neg},{Pos}) |-> {(,)} || ({Zero},{Neg}) |-> {(,)} || ({Pos},{Neg}) |-> {(,)} || ({Neg},{Neg}) |-> {(,)}} |
name: |
quotRemInteger |
precedence: |
no precedence defined |
result-values: |
{(,)} |
signature: |
BinInt -> BinInt -> (BinInt, BinInt) |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |