1#ifndef CONSTMATH_CSQRT_HPP
2#define CONSTMATH_CSQRT_HPP
4#include "../complex.hpp"
5#include "../math_backend.hpp"
24 if (
x <
static_cast<T>(0))
35 return {
static_cast<T>(0),
36 static_cast<T>(
sqrt(-
static_cast<unsigned long long>(
x)))};
43 return {
sqrt(
x),
static_cast<T>(0)};
47 return {
static_cast<T>(
sqrt(
static_cast<unsigned long long>(
x))),
constexpr T sqrt(const T x)
Constexpr square root.
Definition sqrt.hpp:67
constexpr Complex< T > csqrt(const T x)
Complex-valued square root of a real number.
Definition csqrt.hpp:22
constexpr T abs(const T x)
Absolute value of a real number.
Definition abs.hpp:17
constexpr T epsilon()
Machine epsilon for type T.
Definition utilities.hpp:82
Constexpr complex number type.
Definition complex.hpp:26