Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2017 |
---|---|
License | GPL-3 |
Maintainer | ecrockett0@email.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Data type, functions, and instances for complex numbers.
This module is "unsafe" because it exports the Complex
constructor.
This module should only be used to make tensor-specific instances for Complex
.
The safe way to use this type is to import Crypto.Lol.Types.
Documentation
Newtype wrapper (with slightly different instances) for
Number.Complex
.
Instances
Transcendental a => CRTrans Maybe (Complex a) Source # | For testing ergonomics, we also have a |
Transcendental a => CRTrans Identity (Complex a) Source # | Complex numbers have |
Eq a => Eq (Complex a) Source # | |
Show a => Show (Complex a) Source # | |
Random a => Random (Complex a) Source # | |
Defined in Crypto.Lol.Types.Unsafe.Complex | |
NFData a => NFData (Complex a) Source # | |
Defined in Crypto.Lol.Types.Unsafe.Complex | |
C a => C (Complex a) Source # | |
Field a => C (Complex a) Source # | Custom instance replacing the one provided by numeric prelude: it
always returns 0 as the remainder of a division. (The NP instance
sometimes has precision issues, because it yields nonzero
remainders, which is a problem for |
C a => C (Complex a) Source # | |
C a => C (Complex a) Source # | |
Defined in Crypto.Lol.Types.Unsafe.Complex | |
C a => C (Complex a) Source # | |
Transcendental a => CRTEmbed (Complex a) Source # | Self-embed |
ApproxEqual (Complex Double) Source # | |
Show (ArgType (Complex Double)) Source # | |
type CRTExt (Complex a) Source # | |
Defined in Crypto.Lol.CRTrans |
roundComplex :: (RealRing a, ToInteger b) => Complex a -> (b, b) Source #
Rounds the real and imaginary components to the nearest integer.