canon-0.1.0.1: 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 #

Simplify Factorize expressions of the form: x +- y.

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

Convert different sign / operator cases in a standard manner. All 8 combinations 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 CR_. Optimization: Check first if q is a multiple of r. If so, we avoid the potentially expensive conversion.