factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellSafe-Inferred
LanguageHaskell98

Factory.Math.Power

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Exports functions involving integral powers.

Synopsis

Functions

square :: Num n => n -> n Source

Mainly for convenience.

squaresFrom Source

Arguments

:: (Enum n, Num n) 
=> n

Lower bound.

-> [(n, n)]

[(n, n^2)] .

  • Iteratively generate sequential squares, from the specified initial value, based on the fact that (x + 1)^2 = x^2 + 2 * x + 1.
  • The initial value doesn't need to be either positive or integral.

cube :: Num n => n -> n Source

Just for convenience.

cubeRoot :: Double -> Double Source

Just for convenience.

raiseModulo Source

Arguments

:: (Integral i, Integral power, Show power) 
=> i

Base.

-> power 
-> i

Modulus.

-> i

Result.