28#ifndef BERTINI_DOUBLE_EXTENSIONS_HPP
29#define BERTINI_DOUBLE_EXTENSIONS_HPP
53 std::complex<double>
operator*(
unsigned i, std::complex<double> z)
63 bool isnan(std::complex<double>
const& z)
95 return pow(1./z, -power);
107 unsigned int p(
static_cast<unsigned int>(power));
108 complex_dbl result(1,0), z_to_the_current_power_of_two = z;
111 if ( (p & 1) == 1 ) {
112 result *= z_to_the_current_power_of_two;
114 z_to_the_current_power_of_two *= z_to_the_current_power_of_two;
Dependency-free declarations of the pinned draw primitives (ADR-0044).
double DrawSymmetricDouble()
A draw from this thread's pinned stream, uniform on [-1,1].
Definition algorithm_builder.hpp:36
std::complex< double > operator*(unsigned i, std::complex< double > z)
Overload * for unsigned * complex<double>.
Definition double_extensions.hpp:53
bool isnan(std::complex< double > const &z)
an overload of isnan, for std::complex<double>
Definition double_extensions.hpp:63
std::complex< double > complex_dbl
The double-precision complex number type.
Definition double_extensions.hpp:47
double RandReal()
Gets you a random real number between -1 and 1, fwiw.
Definition double_extensions.hpp:74
std::mt19937 & ThreadEngine()
Returns this thread's canonical mt19937 engine.
complex_dbl pow(const complex_dbl &z, int power)
Compute +,- integral powers of a std::complex<double> number.
Definition double_extensions.hpp:92
double real_dbl
The double-precision real number type.
Definition double_extensions.hpp:46