Arkulib
ERationalVerif.hpp
Go to the documentation of this file.
1
9#pragma once
10
11#include <cmath>
12#include <functional>
13#include "../ERational.hpp"
14
15namespace Arkulib::Tools {
16 template <typename OperatorType>
20 OperatorType operatorFunc
21 ) {
22 return operatorFunc(
23 (r1.getNumMultiplier() * std::pow(10, r1.getNumExponent())) / (r1.getDenMultiplier() * std::pow(10, r1.getDenExponent())),
24 (r2.getNumMultiplier() * std::pow(10, r2.getNumExponent())) / (r2.getDenMultiplier() * std::pow(10, r2.getDenExponent()))
25 );
26 }
27}
This class can be used to express big rationals.
Definition: ERational.hpp:21
constexpr short int getNumExponent() const noexcept
Definition: ERational.hpp:106
constexpr FloatType getDenMultiplier() const noexcept
Definition: ERational.hpp:109
constexpr FloatType getNumMultiplier() const noexcept
Definition: ERational.hpp:105
constexpr short int getDenExponent() const noexcept
Definition: ERational.hpp:110
double OpApproximation(Arkulib::ERational<> r1, Arkulib::ERational<> r2, OperatorType operatorFunc)