Safe Haskell | None |
---|
Synopsis
- approx_sin :: FDouble -> FDouble
- template_approx_sin :: Circ (QDouble -> Circ QDouble)
- local_sin :: FDouble -> FDouble
- template_local_sin :: Circ (QDouble -> Circ QDouble)
- local_cos :: FDouble -> FDouble
- template_local_cos :: Circ (QDouble -> Circ QDouble)
- listAngle :: [Double]
- template_listAngle :: Circ [QDouble]
- listCos :: [Double]
- template_listCos :: Circ [QDouble]
- listSin :: [Double]
- template_listSin :: Circ [QDouble]
- list_values :: [(FDouble, FDouble, FDouble)]
- template_list_values :: Circ [(QDouble, QDouble, QDouble)]
- approx_sqrt :: Int -> FDouble -> FDouble
- template_approx_sqrt :: Circ (Int -> Circ (QDouble -> Circ QDouble))
- local_sqrt :: FDouble -> FDouble
- template_local_sqrt :: Circ (QDouble -> Circ QDouble)
- local_mag :: FDouble -> FDouble -> FDouble
- template_local_mag :: Circ (QDouble -> Circ (QDouble -> Circ QDouble))
- rotate :: FDouble -> FDouble -> FDouble -> FDouble -> FDouble -> FDouble -> (FDouble, FDouble)
- template_rotate :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble)))))))
- approx_atan2_aux :: FDouble -> FDouble -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble)
- template_approx_atan2_aux :: Circ (a -> Circ (QDouble -> Circ ((QDouble, QDouble, QDouble) -> Circ ((QDouble, QDouble, QDouble) -> Circ (QDouble, QDouble, QDouble)))))
- approx_atan2 :: FDouble -> FDouble -> FDouble
- template_approx_atan2 :: Circ (QDouble -> Circ (QDouble -> Circ QDouble))
- local_atan2 :: FDouble -> FDouble -> FDouble
- template_local_atan2 :: Circ (QDouble -> Circ (QDouble -> Circ QDouble))
- local_mkPolar :: FDouble -> FDouble -> (FDouble, FDouble)
- template_local_mkPolar :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble)))
- 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
- my_test_fdouble :: IO ()
- 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 -> FDouble Source #
Approximation of the sine function using Taylor series.
local_sin :: FDouble -> FDouble Source #
Implementation of the sine function valid on the whole domain of
FDouble
.
local_cos :: FDouble -> FDouble Source #
Implementation of the cosine function valid on the whole domain
of FDouble
.
template_listAngle :: Circ [QDouble] Source #
template_listCos :: Circ [QDouble] Source #
template_listSin :: Circ [QDouble] Source #
approx_sqrt :: Int -> FDouble -> FDouble Source #
Auxiliary function for local_sqrt
.
local_sqrt :: FDouble -> FDouble Source #
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).
template_rotate :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble))))))) Source #
approx_atan2_aux :: FDouble -> FDouble -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble) -> (FDouble, FDouble, FDouble) Source #
Auxiliary function for approx_atan2
.
template_approx_atan2_aux :: Circ (a -> Circ (QDouble -> Circ ((QDouble, QDouble, QDouble) -> Circ ((QDouble, QDouble, QDouble) -> Circ (QDouble, QDouble, QDouble))))) Source #
approx_atan2 :: FDouble -> FDouble -> FDouble Source #
Definition of atan2
using a CORDIC method. Assume (x,y) is
in first quadrant and that x > y.
class QFloating a where Source #
A type class for quantum floating-point numbers.
Quantum implementation of the sine function.
Quantum implementation of the cosine function.
my_test_fdouble :: IO () Source #
Template subroutines of analytic functions.
template_atan2 :: Circ (QDouble -> Circ (QDouble -> Circ QDouble)) Source #
Template version of atan2
.
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
.
template_symb_colon_symb_plus_ :: Circ (QDouble -> Circ (QDouble -> Circ (QDouble, QDouble))) Source #
template_magnitude :: Circ ((QDouble, QDouble) -> Circ QDouble) Source #
Template version of magnitude
.
template_realPart :: Circ ((QDouble, QDouble) -> Circ QDouble) Source #
Template version of realPart
.
template_imagPart :: Circ ((QDouble, QDouble) -> Circ QDouble) Source #
Template version of imagPart
.
Orphan instances
Floating FDouble # | |
RealFloat FDouble # | |
floatRadix :: FDouble -> Integer # floatDigits :: FDouble -> Int # floatRange :: FDouble -> (Int, Int) # decodeFloat :: FDouble -> (Integer, Int) # encodeFloat :: Integer -> Int -> FDouble # significand :: FDouble -> FDouble # scaleFloat :: Int -> FDouble -> FDouble # isInfinite :: FDouble -> Bool # isDenormalized :: FDouble -> Bool # isNegativeZero :: FDouble -> Bool # |