Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
trigonometry.hpp File Reference
#include <algorithm>
#include <cstdint>
#include <type_traits>
#include <vector>
#include <universal/number/efloat/math/constants/efloat_constants.hpp>
#include <universal/number/efloat/math/exponent.hpp>
#include <universal/number/efloat/math/truncate.hpp>
#include <universal/number/efloat/math/sqrt.hpp>

Classes

struct  sw::universal::efloat_detail::atan_half_constant< nlimbs >
struct  sw::universal::efloat_detail::pi_constant< nlimbs >

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal
namespace  sw::universal::efloat_detail
 decimal formatting (binary -> decimal string at arbitrary precision)

Enumerations

enum class  sw::universal::efloat_detail::trig_function { sw::universal::efloat_detail::sine , sw::universal::efloat_detail::cosine , sw::universal::efloat_detail::tangent }

Functions

template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_pi_2 ()
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_pi_4 ()
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::atan_reciprocal (unsigned m, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::atan_half (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::pi (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::pi_scaled (unsigned bits, int e)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::reduce_half_pi (const efloat< nlimbs > &x, unsigned bits, unsigned &quadrant)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::versine_with (const efloat< nlimbs > &r, unsigned T)
constexpr unsigned sw::universal::efloat_detail::versine_target (unsigned F) noexcept
constexpr unsigned sw::universal::efloat_detail::arctangent_target (unsigned W) noexcept
constexpr unsigned sw::universal::efloat_detail::arctangent_block_length (unsigned N) noexcept
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::versine (const efloat< nlimbs > &r)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::sin_from_versine (const efloat< nlimbs > &v, const efloat< nlimbs > &r)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::cos_from_versine (const efloat< nlimbs > &v)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::trig_working (const efloat< nlimbs > &x, unsigned bits, trig_function f)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::sin (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::cos (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::tan (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::atan_working_with (const efloat< nlimbs > &x, unsigned working, unsigned T)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::atan_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::asin_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::acos_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::atan2_working (const efloat< nlimbs > &y, const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs, typename Evaluate>
constexpr efloat< nlimbs > sw::universal::efloat_detail::round_inverse_trig (Evaluate evaluate, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::efloat_detail::round_pi (unsigned m, int e, bool negative, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr bool sw::universal::efloat_detail::inverse_trig_tiny (const efloat< nlimbs > &x, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::atan (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::asin (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::acos (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sw::universal::atan2 (const efloat< nlimbs > &y, const efloat< nlimbs > &x)

Variables

constexpr unsigned sw::universal::efloat_detail::trig_error_bits = 32u
constexpr unsigned sw::universal::efloat_detail::inverse_trig_error_bits = 24u