canon-0.1.0.0: Massive Number Arithmetic

Copyright(c) 2015-2018 Frederick Schneider
LicenseMIT
MaintainerFrederick Schneider <frederick.schneider2011@gmail.com>
StabilityProvisional
Safe HaskellNone
LanguageHaskell2010

Math.NumberTheory.Canon.Additive

Description

Mostly functions for the addition and subtraction of CRs (Canonical Representations of numbers)

Synopsis

Documentation

crAdd :: CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

Functions for computing sums and differences.

crSubtract :: CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

Functions for computing sums and differences.

crAddR :: CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

Functions for computing sums and differences.

crSubtractR :: CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

Functions for computing sums and differences.

crApplyAdtvOpt :: Bool -> CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

crApplyAdtvOpt: SimplifiesFactorizes expressions x +- y.

crApplyAdtvOptConv :: Bool -> CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

crApplyAdtvOptConv is setup to convert different cases in a standard manner. All 8 combinations of signs and operators are covered here.

crApplyAdtvOptR :: Bool -> CR_ -> CR_ -> CycloMap -> (CR_, CycloMap) Source #

crApplyAdtvOptR performs addition/subtraction on two rational canons.

crQuotRem :: CR_ -> CR_ -> CycloMap -> ((CR_, CR_), CycloMap) Source #

Quot Rem function for Canon Rep. Optimization: Check first if q is a multiple of r. If so, we avoid the potentially expensive conversion.