X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Frational.h;h=595f5f25288c4ac87e9ccbce733a7f248cc2531e;hp=61a38ab76e305edf9caf45cb0eece53f57d06165;hb=b3c2d3472c3b3d77eae0f66731a32b852dce11f0;hpb=b02dcbab39b8c28b9baa41436842ca9fe4ae7ffd diff --git a/src/rational.h b/src/rational.h index 61a38ab..595f5f2 100644 --- a/src/rational.h +++ b/src/rational.h @@ -9,6 +9,7 @@ #include #include #include "arbint.h" +#include "gmpint.h" namespace IPDF { @@ -18,7 +19,7 @@ template T Tabs(const T & a) return abs(a); } template <> Arbint Tabs(const Arbint & a); - +template <> Gmpint Tabs(const Gmpint & a); /* Recursive version of GCD template @@ -195,13 +196,6 @@ struct Rational T Q; }; -inline Rational pow(const Rational & a, const Rational & b) -{ - //TODO:Implement properly - int64_t P = std::pow((double)a.P, b.ToDouble()); - int64_t Q = std::pow((double)a.Q, b.ToDouble()); - return Rational(P, Q); -}