numeric-prelude-0.4.2: An experimental alternative hierarchy of numeric type classes

Safe HaskellNone
LanguageHaskell98

Algebra.Algebraic

Contents

Synopsis

Documentation

class C a => C a where Source

Minimal implementation: root or '(^/)'.

Minimal complete definition

root | (^/)

Methods

sqrt :: a -> a Source

root :: Integer -> a -> a Source

(^/) :: a -> Rational -> a infixr 8 Source

Instances

C Double 
C Float 
C T 
C T 
(Ord a, C a) => C (T a) 
C a => C (T a) 
C a => C (T a) 
C a => C (T a) 
Floating a => C (T a) 
(C a, C a) => C (T a) 
(C a, C a) => C (T a) 
(C a, C a, Power a) => C (T a) 
C a => C (T a) 
(C a, C v, Show v, C a v) => C (T a v) 
(Ord i, C a) => C (T i a) 
C v => C (T a v) 

genericRoot :: (C a, C b) => b -> a -> a Source

power :: (C a, C b) => b -> a -> a Source

Properties

propSqrSqrt :: (Eq a, C a) => a -> Bool Source

propPowerCascade :: (Eq a, C a) => a -> Rational -> Rational -> Bool Source

propPowerProduct :: (Eq a, C a) => a -> Rational -> Rational -> Bool Source

propPowerDistributive :: (Eq a, C a) => Rational -> a -> a -> Bool Source