Copyright | (c) 2011 Daniel Fischer |
---|---|

License | MIT |

Maintainer | Daniel Fischer <daniel.is.fischer@googlemail.com> |

Stability | Provisional |

Portability | Non-portable (GHC extensions) |

Safe Haskell | None |

Language | Haskell2010 |

Low level gcd and coprimality functions using the binary gcd algorithm. Normally, accessing these via the higher level interface of Math.NumberTheory.GCD should be sufficient.

# Specialised GCDs

gcdInt :: Int -> Int -> Int Source #

Deprecated: Use Math.NumberTheory.Euclidean.gcd

Greatest common divisor of two `Int`

s, calculated with the binary gcd algorithm.

gcdWord :: Word -> Word -> Word Source #

Deprecated: Use Math.NumberTheory.Euclidean.gcd

Greatest common divisor of two `Word`

s, calculated with the binary gcd algorithm.

## GCDs for unboxed types

gcdInt# :: Int# -> Int# -> Int# Source #

Deprecated: Use Math.NumberTheory.Euclidean.gcd

Greatest common divisor of two `Int#`

s, calculated with the binary gcd algorithm.

gcdWord# :: Word# -> Word# -> Word# Source #

Deprecated: Use Math.NumberTheory.Euclidean.gcd

Greatest common divisor of two `Word#`

s, calculated with the binary gcd algorithm.

# Specialised tests for coprimality

coprimeInt :: Int -> Int -> Bool Source #

Deprecated: Math.NumberTheory.Euclidean.

Test whether two `Int`

s are coprime, using an abbreviated binary gcd algorithm.

coprimeWord :: Word -> Word -> Bool Source #

Deprecated: Math.NumberTheory.Euclidean.

Test whether two `Word`

s are coprime, using an abbreviated binary gcd algorithm.