cifl-math-library-1.1.1.0: Math libraries
Safe HaskellSafe
LanguageHaskell2010

Math.Number.Interface

Synopsis

Documentation

nthroot :: Floating a => a -> a -> a Source #

logroot :: Floating a => a -> a -> a Source #

cuberoot :: (Floating a, Numerics a) => a -> a Source #

class Ord q => DedekindCut q r where Source #

Dedekind cut. Notice typically in constructive reals, it's possible to implement comparison between rational and real by utilizing denominator of the rational as describing desired accuracy but comparison between two reals is undecidable. Note, naming is chosen so the percentage mark is at side that can always be compared.

Minimal complete definition

(%<), (<%)

Methods

(%<) :: q -> r -> Bool Source #

(<%) :: r -> q -> Bool Source #

(%>) :: q -> r -> Bool Source #

(>%) :: r -> q -> Bool Source #

is_apart :: r -> q -> r -> Bool Source #

Instances

Instances details
DedekindCut Rational Rational Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Rational R Source #

tricky stuff. We use the denominator from the rational to determine what accuracy to use for comparison, then use rational comparison. Notice that this doesn't really allow good control of precision of computation, since rational numbers are normalized by default.

Instance details

Defined in Math.Number.R

DedekindCut Rational R Source # 
Instance details

Defined in Math.Number.Real

DedekindCut Rational Double Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Rational Float Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Integer Rational Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Integer R Source # 
Instance details

Defined in Math.Number.R

Methods

(%<) :: Integer -> R -> Bool Source #

(<%) :: R -> Integer -> Bool Source #

(%>) :: Integer -> R -> Bool Source #

(>%) :: R -> Integer -> Bool Source #

is_apart :: R -> Integer -> R -> Bool Source #

DedekindCut Integer R Source # 
Instance details

Defined in Math.Number.Real

Methods

(%<) :: Integer -> R -> Bool Source #

(<%) :: R -> Integer -> Bool Source #

(%>) :: Integer -> R -> Bool Source #

(>%) :: R -> Integer -> Bool Source #

is_apart :: R -> Integer -> R -> Bool Source #

DedekindCut Integer Integer Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Integer Double Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Integer Float Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Double R Source # 
Instance details

Defined in Math.Number.R

Methods

(%<) :: Double -> R -> Bool Source #

(<%) :: R -> Double -> Bool Source #

(%>) :: Double -> R -> Bool Source #

(>%) :: R -> Double -> Bool Source #

is_apart :: R -> Double -> R -> Bool Source #

DedekindCut Double Double Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Float R Source # 
Instance details

Defined in Math.Number.R

Methods

(%<) :: Float -> R -> Bool Source #

(<%) :: R -> Float -> Bool Source #

(%>) :: Float -> R -> Bool Source #

(>%) :: R -> Float -> Bool Source #

is_apart :: R -> Float -> R -> Bool Source #

DedekindCut Float Float Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Int Rational Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Int R Source # 
Instance details

Defined in Math.Number.R

Methods

(%<) :: Int -> R -> Bool Source #

(<%) :: R -> Int -> Bool Source #

(%>) :: Int -> R -> Bool Source #

(>%) :: R -> Int -> Bool Source #

is_apart :: R -> Int -> R -> Bool Source #

DedekindCut Int R Source # 
Instance details

Defined in Math.Number.Real

Methods

(%<) :: Int -> R -> Bool Source #

(<%) :: R -> Int -> Bool Source #

(%>) :: Int -> R -> Bool Source #

(>%) :: R -> Int -> Bool Source #

is_apart :: R -> Int -> R -> Bool Source #

DedekindCut Int Double Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Int Float Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Int Int Source # 
Instance details

Defined in Math.Number.Interface

Methods

(%<) :: Int -> Int -> Bool Source #

(<%) :: Int -> Int -> Bool Source #

(%>) :: Int -> Int -> Bool Source #

(>%) :: Int -> Int -> Bool Source #

is_apart :: Int -> Int -> Int -> Bool Source #

DedekindCut Word Rational Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Word R Source # 
Instance details

Defined in Math.Number.R

Methods

(%<) :: Word -> R -> Bool Source #

(<%) :: R -> Word -> Bool Source #

(%>) :: Word -> R -> Bool Source #

(>%) :: R -> Word -> Bool Source #

is_apart :: R -> Word -> R -> Bool Source #

DedekindCut Word R Source # 
Instance details

Defined in Math.Number.Real

Methods

(%<) :: Word -> R -> Bool Source #

(<%) :: R -> Word -> Bool Source #

(%>) :: Word -> R -> Bool Source #

(>%) :: R -> Word -> Bool Source #

is_apart :: R -> Word -> R -> Bool Source #

DedekindCut Word Double Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Word Float Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Word Word Source # 
Instance details

Defined in Math.Number.Interface

DedekindCut Double (Quantity Double) Source # 
Instance details

Defined in Math.Number.DimensionalAnalysis

DedekindCut Float (Quantity Float) Source # 
Instance details

Defined in Math.Number.DimensionalAnalysis

(DedekindCut a b, Show a, Num a) => DedekindCut (Quantity a) (Quantity b) Source # 
Instance details

Defined in Math.Number.DimensionalAnalysis

class Infinitary a where Source #

Methods

infinite :: a Source #

Instances

Instances details
Infinitary R Source # 
Instance details

Defined in Math.Number.R

Methods

infinite :: R Source #

Infinitary R Source # 
Instance details

Defined in Math.Number.Real

Methods

infinite :: R Source #

Infinitary Double Source # 
Instance details

Defined in Math.Number.Interface

Infinitary Float Source # 
Instance details

Defined in Math.Number.Interface

Infinitary (Closure Stream Rational) Source # 
Instance details

Defined in Math.Number.Stream

Infinitary (Closure Stream R) Source # 
Instance details

Defined in Math.Number.R

Infinitary (Closure Stream R) Source # 
Instance details

Defined in Math.Number.Real

Infinitary (Closure Stream Integer) Source # 
Instance details

Defined in Math.Number.Stream

class Infinitary a => PotentiallyInfinite a where Source #

Methods

is_infinite :: a -> Bool Source #

Instances

Instances details
PotentiallyInfinite Double Source # 
Instance details

Defined in Math.Number.Interface

PotentiallyInfinite Float Source # 
Instance details

Defined in Math.Number.Interface

class Numerics a where Source #

Methods

newtons_method :: (a -> a) -> a -> a Source #

Instances

Instances details
Numerics R Source # 
Instance details

Defined in Math.Number.R

Methods

newtons_method :: (R -> R) -> R -> R Source #

Numerics R Source # 
Instance details

Defined in Math.Number.Real

Methods

newtons_method :: (R -> R) -> R -> R Source #

class RationalRoots a where Source #

Methods

rational_power :: a -> Rational -> a Source #

class Num r => DifferentiallyClosed r where Source #

Methods

derivate :: (r -> r) -> r -> r Source #

integral :: (r, r) -> (r -> r) -> r Source #

Instances

Instances details
DifferentiallyClosed R Source # 
Instance details

Defined in Math.Number.R

Methods

derivate :: (R -> R) -> R -> R Source #

integral :: (R, R) -> (R -> R) -> R Source #

DifferentiallyClosed R Source # 
Instance details

Defined in Math.Number.Real

Methods

derivate :: (R -> R) -> R -> R Source #

integral :: (R, R) -> (R -> R) -> R Source #

DifferentiallyClosed a => DifferentiallyClosed (Vector1 a) Source # 
Instance details

Defined in Math.Matrix.Vector1

Methods

derivate :: (Vector1 a -> Vector1 a) -> Vector1 a -> Vector1 a Source #

integral :: (Vector1 a, Vector1 a) -> (Vector1 a -> Vector1 a) -> Vector1 a Source #

(Show r, DifferentiallyClosed r, VectorSpace r) => DifferentiallyClosed (Quantity r) Source # 
Instance details

Defined in Math.Number.DimensionalAnalysis

Methods

derivate :: (Quantity r -> Quantity r) -> Quantity r -> Quantity r Source #

integral :: (Quantity r, Quantity r) -> (Quantity r -> Quantity r) -> Quantity r Source #

DifferentiallyClosed (Closure Stream R) Source # 
Instance details

Defined in Math.Number.Real

integral_vector :: (VectorSpace b, Applicative f, Enum a, Num a) => (f a, f a) -> (a -> b) -> f a -> f b Source #

derivate_vector :: (Applicative t, DifferentiallyClosed r) => t (r -> r) -> t r -> t r Source #

class DifferentialOperator t where Source #

Methods

partial :: DifferentiallyClosed a => (t a -> a) -> t a -> t a Source #

Instances

Instances details
DifferentialOperator Vector2 Source # 
Instance details

Defined in Math.Matrix.Vector2

Methods

partial :: DifferentiallyClosed a => (Vector2 a -> a) -> Vector2 a -> Vector2 a Source #

DifferentialOperator Vector3 Source # 
Instance details

Defined in Math.Matrix.Linear

Methods

partial :: DifferentiallyClosed a => (Vector3 a -> a) -> Vector3 a -> Vector3 a Source #

DifferentialOperator Vector4 Source # 
Instance details

Defined in Math.Matrix.LinearOperations

Methods

partial :: DifferentiallyClosed a => (Vector4 a -> a) -> Vector4 a -> Vector4 a Source #

partial1_2 :: DifferentiallyClosed a => (a -> b -> a) -> a -> b -> a Source #

partial2_2 :: DifferentiallyClosed a => (b -> a -> a) -> b -> a -> a Source #

partial1_3 :: DifferentiallyClosed a => (a -> b -> c -> a) -> a -> b -> c -> a Source #

partial2_3 :: DifferentiallyClosed a => (b -> a -> c -> a) -> b -> a -> c -> a Source #

partial3_3 :: DifferentiallyClosed a => (b -> c -> a -> a) -> b -> c -> a -> a Source #

partial1_4 :: DifferentiallyClosed a => (a -> b -> c -> d -> a) -> a -> b -> c -> d -> a Source #

partial2_4 :: DifferentiallyClosed a => (b -> a -> c -> d -> a) -> b -> a -> c -> d -> a Source #

partial3_4 :: DifferentiallyClosed a => (b -> c -> a -> d -> a) -> b -> c -> a -> d -> a Source #

partial4_4 :: DifferentiallyClosed a => (b -> c -> d -> a -> a) -> b -> c -> d -> a -> a Source #

class Show r => ShowPrecision r where Source #

Instances

Instances details
ShowPrecision R Source # 
Instance details

Defined in Math.Number.Real

ShowPrecision Integer Source # 
Instance details

Defined in Math.Number.Interface

ShowPrecision Double Source # 
Instance details

Defined in Math.Number.Interface

ShowPrecision Float Source # 
Instance details

Defined in Math.Number.Interface

ShowPrecision Int Source # 
Instance details

Defined in Math.Number.Interface

ShowPrecision a => ShowPrecision (Complex a) Source # 
Instance details

Defined in Math.Number.Interface

ShowPrecision s => ShowPrecision (Vector3 s) Source # 
Instance details

Defined in Math.Matrix.Vector3

ShowPrecision s => ShowPrecision (Vector4 s) Source # 
Instance details

Defined in Math.Matrix.Vector4

derivate_commutator :: DifferentiallyClosed r => (r -> r) -> (r -> r) -> r -> r Source #

computes \(f'(x)*g(x) - f(x)*g'(x)\)

derivate_anticommutator :: DifferentiallyClosed r => (r -> r) -> (r -> r) -> r -> r Source #

computes \(f'(x)*g(x) + f(x)*g'(x)\). Notice this is product rule.

derivates :: (StreamBuilder str, DifferentiallyClosed r) => (r -> r) -> str (r -> r) Source #

atan2_generic :: Floating a => a -> a -> a Source #

line_integral :: DifferentiallyClosed r => (r -> r) -> (r -> r) -> (r, r) -> r Source #

precisionCompare :: (Ord a, Num a) => a -> a -> a -> Bool Source #

compare to a certain precision, appropriate for floating point style numeric types. first argument is precision.

liftInverse :: (Fractional a, Fractional b) => (a -> b) -> a -> b Source #