Scalar

Functions

template<typename T >
constexpr nil::crypto3::detail::remove_complex_t< T > nil::crypto3::algebra::abs (T x)
 computes the absolute value More...
 
template<typename T >
constexpr T nil::crypto3::algebra::conj (T x)
 computes the complex conjugate More...
 
constexpr double nil::crypto3::algebra::exponentiate (double x, int n)
 computes exponents More...
 
constexpr double nil::crypto3::algebra::nthroot (double x, int n)
 computes the $n$th root More...
 
constexpr double nil::crypto3::algebra::sqrt (double x)
 computes the square root More...
 
constexpr float nil::crypto3::algebra::sqrt (float x)
 computes the square root More...
 

Detailed Description

Function Documentation

◆ abs()

template<typename T >
constexpr nil::crypto3::detail::remove_complex_t<T> nil::crypto3::algebra::abs ( x)
constexpr

computes the absolute value

Parameters
xargument
Returns
$ \lvert x \rvert $

Computes the absolute value.

◆ conj()

template<typename T >
constexpr T nil::crypto3::algebra::conj ( x)
constexpr

computes the complex conjugate

Parameters
xargument
Returns
$ \bar{x} $

Computes the complex conjugate.

◆ exponentiate()

constexpr double nil::crypto3::algebra::exponentiate ( double  x,
int  n 
)
constexpr

computes exponents

Parameters
xbase
nexponent
Returns
$ x^n $

Computes the exponentiation of a value to integer powers.

◆ nthroot()

constexpr double nil::crypto3::algebra::nthroot ( double  x,
int  n 
)
constexpr

computes the $n$th root

Parameters
xargument
ndegree
Returns
$ \sqrt[\leftroot{-2}\uproot{2}n]{x} $

Computes the $n$th root.

◆ sqrt() [1/2]

constexpr double nil::crypto3::algebra::sqrt ( double  x)
constexpr

computes the square root

Parameters
xargument
Returns
$ \sqrt{x} $

Computes the square root.

◆ sqrt() [2/2]

constexpr float nil::crypto3::algebra::sqrt ( float  x)
constexpr

computes the square root

Parameters
xargument
Returns
$ \sqrt{x} $

Computes the square root.