QUGaR 0.0.4
Loading...
Searching...
No Matches
numbers.hpp
Go to the documentation of this file.
1#ifndef QUGAR_LIBRARY_NUMBERS_HPP
2#define QUGAR_LIBRARY_NUMBERS_HPP
3
10
11#include <qugar/types.hpp>
12
13#include <limits>
14#include <numbers>
15
17namespace qugar::numbers {
18
20constexpr real zero{ 0.0 };
22constexpr real one{ 1.0 };
24constexpr real two{ 2.0 };
26constexpr real three{ 3.0 };
28constexpr real four{ 4.0 };
30constexpr real five{ 5.0 };
32constexpr real six{ 6.0 };
34constexpr real seven{ 7.0 };
36constexpr real eight{ 8.0 };
38constexpr real nine{ 9.0 };
40constexpr real half{ 0.5 };
42constexpr real one_third{ 1.0 / 3.0 };
44constexpr real two_thirds{ 2.0 / 3.0 };
46constexpr real four_thirds{ 4.0 / 3.0 };
48constexpr real one_quarter{ 0.25 };
50constexpr real three_quarters{ 0.75 };
52constexpr real pi{ std::numbers::pi_v<real> };
54constexpr real infty{ std::numeric_limits<real>::infinity() };
56constexpr real eps = std::numeric_limits<real>::epsilon();
58constexpr real near_eps = real{ 10.0 } * eps;
59
60}// namespace qugar::numbers
61
62#endif// QUGAR_LIBRARY_NUMBERS_HPP
Numbers' namespace.
Definition numbers.hpp:17
constexpr real two
Real two value.
Definition numbers.hpp:24
constexpr real four_thirds
Real four thirds value.
Definition numbers.hpp:46
constexpr real three_quarters
Real three quarters value.
Definition numbers.hpp:50
constexpr real zero
Real zero value.
Definition numbers.hpp:20
constexpr real three
Real three value.
Definition numbers.hpp:26
constexpr real half
Real one over two value.
Definition numbers.hpp:40
constexpr real one_quarter
Real one quarter value.
Definition numbers.hpp:48
constexpr real eps
Machine epsilon.
Definition numbers.hpp:56
constexpr real eight
Real eight value.
Definition numbers.hpp:36
constexpr real five
Real five value.
Definition numbers.hpp:30
constexpr real pi
Pi.
Definition numbers.hpp:52
constexpr real one_third
Real one third value.
Definition numbers.hpp:42
constexpr real six
Real six value.
Definition numbers.hpp:32
constexpr real nine
Real nine value.
Definition numbers.hpp:38
constexpr real near_eps
Near machine epsilon (10 times the machine precision.
Definition numbers.hpp:58
constexpr real seven
Real seven value.
Definition numbers.hpp:34
constexpr real infty
Infinity.
Definition numbers.hpp:54
constexpr real four
Real four value.
Definition numbers.hpp:28
constexpr real one
Real one value.
Definition numbers.hpp:22
constexpr real two_thirds
Real two thirds value.
Definition numbers.hpp:44
double real
Definition types.hpp:18
Declaration of types.