Fraction.hpp

Tools to maintain a more exact fraction (rather than lose precision as a double)

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2021 Michigan State University MIT Software license; see doc/LICENSE.md

Note

Status: ALPHA

Defines

INCLUDE_EMP_MATH_FRACTION_HPP_GUARD
class Fraction
#include <Fraction.hpp>

Public Functions

inline void Reduce()
inline Fraction(int64_t in_num = 0, int64_t in_denom = 1)
Fraction(const Fraction&) = default
inline int64_t GetNumerator() const
inline int64_t GetDenominator() const

Private Members

int64_t num
int64_t denom