#include <iostream>
int main()
{
F a = 5;
F b = 2.5;
F c;
std::cout << "Enter a value: ";
std::cin >> c;
F d = (a + b + c) / 3;
std::cout << "Average: " << d << std::endl;
std::cout <<
"which has raw value: " << d.
raw_value << std::endl;
auto x = a < F2{5};
std::cout << x << std::endl;
}
Includes all of libfxd headers.
The fixed-point class template.
raw_type raw_value
The raw value, stored as a bitfield.