Safe Haskell | None |
---|
Algorithms.QLS.RealFunc
Contents
- approx_sin :: FDouble -> FDouble
- local_sin :: FDouble -> FDouble
- local_cos :: FDouble -> FDouble
- approx_sqrt :: Int -> FDouble -> FDouble
- local_sqrt :: FDouble -> FDouble
- local_mag :: FDouble -> FDouble -> FDouble
- rotate :: FDouble -> FDouble -> FDouble -> FDouble -> FDouble -> FDouble -> (FDouble, FDouble)
- approx_atan2_aux :: FDouble -> FDouble -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble)
- approx_atan2 :: FDouble -> FDouble -> FDouble
- local_atan2 :: FDouble -> FDouble -> FDouble
- local_mkPolar :: FDouble -> FDouble -> (FDouble, FDouble)
- class QFloating a where
- q_atan2 :: QDouble -> QDouble -> Circ QDouble
- q_magnitude :: (QDouble, QDouble) -> Circ QDouble
- q_mkPolar :: QDouble -> QDouble -> Circ (QDouble, QDouble)
- q_Re :: (QDouble, QDouble) -> Circ QDouble
- q_Im :: (QDouble, QDouble) -> Circ QDouble
- template_sin :: Circ (QDouble -> Circ QDouble)
- template_cos :: Circ (QDouble -> Circ QDouble)
- template_atan2 :: Circ (QDouble -> Circ (QDouble -> Circ QDouble))
- template_mkPolar :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble)))
- template_symb_colon_symb_plus_ :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble)))
- template_magnitude :: Circ ((QDouble, QDouble) -> Circ QDouble)
- template_realPart :: Circ ((QDouble, QDouble) -> Circ QDouble)
- template_imagPart :: Circ ((QDouble, QDouble) -> Circ QDouble)
Some analytic functions on FDouble
.
approx_sin :: FDouble -> FDoubleSource
Approximation of the sine function using Taylor series.
local_sin :: FDouble -> FDoubleSource
Implementation of the sine function valid on the whole domain of
FDouble
.
local_cos :: FDouble -> FDoubleSource
Implementation of the cosine function valid on the whole domain
of FDouble
.
approx_sqrt :: Int -> FDouble -> FDoubleSource
Auxiliary function for local_sqrt
.
local_sqrt :: FDouble -> FDoubleSource
Approximation of the square root using iterative means.
rotate :: FDouble -> FDouble -> FDouble -> FDouble -> FDouble -> FDouble -> (FDouble, FDouble)Source
Apply the matrix
( a b ) ( c d )
to the column vector (x,y).
approx_atan2_aux :: FDouble -> FDouble -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble)Source
Auxiliary function for approx_atan2
.
approx_atan2 :: FDouble -> FDouble -> FDoubleSource
Definition of atan2
using a CORDIC method. Assume (x,y) is
in first quadrant and that x > y.
local_atan2 :: FDouble -> FDouble -> FDoubleSource
local_mkPolar :: FDouble -> FDouble -> (FDouble, FDouble)Source
The function mkPolar
defined for FDouble
.
A type class for quantum floating-point numbers.
Methods
Quantum implementation of the sine function.
Quantum implementation of the cosine function.
q_magnitude :: (QDouble, QDouble) -> Circ QDoubleSource
Quantum implementation of magnitude
on QDouble
.
q_mkPolar :: QDouble -> QDouble -> Circ (QDouble, QDouble)Source
Quantum implementation of mkPolar
on QDouble
.
Template subroutines of analytic functions.
Template subroutines for dealing with quantum complex number encoded as pairs of QDouble
.
template_mkPolar :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble)))Source
Template version of mkPolar
.