complex-generic-0.1.1.1: complex numbers with non-mandatory RealFloat

Copyright(c) Claude Heiland-Allen 2012
LicenseBSD3
Maintainerclaude@mathr.co.uk
Stabilityunstable
PortabilityMultiParamTypeClasses, FunctionalDependencies
Safe HaskellSafe
LanguageHaskell98

Data.Complex.Generic.Class

Description

Classes for complex number operations.

Synopsis

Documentation

class ComplexRect c r | c -> r where Source #

Rectangular form.

Minimal complete definition

mkRect, real, imag, rect, realPart, imagPart, conjugate, magnitudeSquared, sqr, (.*), (*.)

Methods

mkRect :: r -> r -> c Source #

Construction.

real :: r -> c Source #

Construction with imagPart 0.

imag :: r -> c Source #

Construction with realPart 0.

rect :: c -> (r, r) Source #

Deconstruction.

realPart :: c -> r Source #

Get the real part.

imagPart :: c -> r Source #

Get the imaginary part.

conjugate :: c -> c Source #

Conjugation.

magnitudeSquared :: c -> r Source #

Squared magnitude.

sqr :: c -> c Source #

Complex square.

(.*) :: r -> c -> c infixl 7 Source #

Real-complex multiplication.

(*.) :: c -> r -> c infixl 7 Source #

Complex-real multiplication.

Instances

ComplexRect (Complex Double) Double Source # 
ComplexRect (Complex Float) Float Source # 
ComplexRect (Complex Int) Int Source # 
ComplexRect (Complex Int8) Int8 Source # 
ComplexRect (Complex Int16) Int16 Source # 
ComplexRect (Complex Int32) Int32 Source # 
ComplexRect (Complex Int64) Int64 Source # 
ComplexRect (Complex Integer) Integer Source # 
ComplexRect (Complex Word) Word Source # 
ComplexRect (Complex Word8) Word8 Source # 
ComplexRect (Complex Word16) Word16 Source # 
ComplexRect (Complex Word32) Word32 Source # 
ComplexRect (Complex Word64) Word64 Source # 
ComplexRect (Complex CFloat) CFloat Source # 
ComplexRect (Complex CDouble) CDouble Source # 
Integral t => ComplexRect (Complex (Ratio t)) (Ratio t) Source # 
HasResolution t => ComplexRect (Complex (Fixed t)) (Fixed t) Source # 

(/.) :: (Fractional r, ComplexRect c r) => c -> r -> c infixl 6 Source #

Complex-real division.

(.+) :: ComplexRect c r => r -> r -> c infix 6 Source #

A synonym for mkRect.