#include <bfloat16.hpp>
class bfloat16
{
public:
// unions
union F32;
// construction
bfloat16();
bfloat16(float value);
template <typename I>
bfloat16(I value);
// methods
std::string to_string() const;
size_t size() const;
template <typename T>
bool operator == (const T& other) const;
template <typename T>
bool operator != (const T& other) const;
template <typename T>
bool operator < (const T& other) const;
template <typename T>
bool operator <= (const T& other) const;
template <typename T>
bool operator > (const T& other) const;
template <typename T>
bool operator >= (const T& other) const;
template <typename T>
bfloat16 operator + (const T& other) const;
template <typename T>
bfloat16 operator += (const T& other);
template <typename T>
bfloat16 operator - (const T& other) const;
template <typename T>
bfloat16 operator -= (const T& other);
template <typename T>
bfloat16 operator\* (const T& other) const;
template <typename T>
bfloat16 operator\*= (const T& other);
template <typename T>
bfloat16 operator/ (const T& other) const;
template <typename T>
bfloat16 operator/= (const T& other);
operator float () const;
uint16_t to_bits() const;
static std::vector<float> to_float_vector(const std::vector<bfloat16>&);
static std::vector<bfloat16> from_float_vector(const std::vector<float>&);
static constexpr bfloat16 from_bits(uint16_t bits);
static uint16_t round_to_nearest_even(float x);
static uint16_t round_to_nearest(float x);
static uint16_t truncate(float x);
};