newsynth-0.4.0.0: Exact and approximate synthesis of quantum circuits

Quantum.Synthesis.ArcTan2

Contents

Description

This module provides a replacement for Haskell's atan2. The problem is that Haskell's standard implementation of atan2 depends on the RealFloat class, which limits its applicability. So we provide a new ArcTan2 class with an arctan2 function.

Unlike Haskell's atan2, the arctan2 function may not take signed zeros and signed infinities into account. But it works at fixed-precision types such as FixedPrec.

Synopsis

# The arctan2 function

class ArcTan2 a where Source #

We provide a replacement for Haskell's atan2, because the latter depends on the RealFloat class, which limits its applicability.

Minimal complete definition

arctan2

Methods

arctan2 :: a -> a -> a Source #

Instances

 Source # Methods Source # Methods Source # Methods Precision e => ArcTan2 (FixedPrec e) Source # Methodsarctan2 :: FixedPrec e -> FixedPrec e -> FixedPrec e Source #