class ov::float16

#include <float16.hpp>

class float16
{
public:
    // unions

    union F32;

    // fields

    static constexpr uint32_t frac_size = 10;
    static constexpr uint32_t exp_size = 5;
    static constexpr uint32_t exp_bias = 15;

    // construction

    float16();
    float16(uint32_t sign, uint32_t biased_exponent, uint32_t fraction);
    float16(float value);

    template <typename I>
    float16(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>
    float16 operator + (const T& other) const;

    template <typename T>
    float16 operator += (const T& other);

    template <typename T>
    float16 operator - (const T& other) const;

    template <typename T>
    float16 operator -= (const T& other);

    template <typename T>
    float16 operator\* (const T& other) const;

    template <typename T>
    float16 operator\*= (const T& other);

    template <typename T>
    float16 operator/ (const T& other) const;

    template <typename T>
    float16 operator/= (const T& other);

    operator float () const;
    uint16_t to_bits() const;
    static constexpr float16 from_bits(uint16_t bits);
};