numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
sqrt.h File Reference

Definition of sqrt function. More...

#include <limits>
#include <type_traits>
#include "num_collect/constants/half.h"
#include "num_collect/constants/one.h"
#include "num_collect/constants/zero.h"
+ Include dependency graph for sqrt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  num_collect
 Namespace of num_collect source codes.
 
namespace  num_collect::constants
 Namespace of constexpr variables and functions.
 

Functions

template<typename F , std::enable_if_t< std::is_floating_point_v< F >, void * > = nullptr>
constexpr auto num_collect::constants::sqrt (F x) -> F
 Calculate square root \( \sqrt{x} \).
 
template<typename I , std::enable_if_t< std::is_integral_v< I >, void * > = nullptr>
constexpr auto num_collect::constants::sqrt (I x) -> double
 Calculate square root \( \sqrt{x} \).
 

Detailed Description

Definition of sqrt function.

Definition in file sqrt.h.