#include #include "fraction.hpp" // main: int main() { int error = EXIT_SUCCESS; Fraction value; fraction_init(&value); Fraction sum; fraction_init(&sum); while (std::cin >> value) { std::cout << "> " << value << std::endl; sum = sum + value; } // fraction_print(std::cout, value) << ':'; // fraction_print(std::cout, sum) << std::endl; // operator<<(std::cout, sum) << std::endl; std::cout << sum << std::endl; return error; } // fixed-point 2^64, unsigned/signed(two's complement) // floating-point 238.72 == 23.872*10^1 == 287.2*10^-1 IEEE 754 // quantum arithmetic // arbitrary-precision arithmetic (SW)