f31 Struct Reference

Class for 1.31 unsigned floating-point computation. More...

#include <half.hpp>

Public Member Functions

HALF_CONSTEXPR f31 (uint32 mant, int e)
 
 f31 (unsigned int abs)
 

Public Attributes

uint32 m
 mantissa as 1.31. More...
 
int exp
 exponent. More...
 

Friends

f31 operator+ (f31 a, f31 b)
 
f31 operator- (f31 a, f31 b)
 
f31 operator* (f31 a, f31 b)
 
f31 operator/ (f31 a, f31 b)
 

Detailed Description

Class for 1.31 unsigned floating-point computation.

Definition at line 1838 of file half.hpp.

Constructor & Destructor Documentation

◆ f31() [1/2]

HALF_CONSTEXPR f31 ( uint32  mant,
int  e 
)
inline

Constructor.

Parameters
mantmantissa as 1.31
eexponent

Definition at line 1843 of file half.hpp.

◆ f31() [2/2]

f31 ( unsigned int  abs)
inline

Constructor.

Parameters
absunsigned half-precision value

Definition at line 1847 of file half.hpp.

Friends And Related Function Documentation

◆ operator*

f31 operator* ( f31  a,
f31  b 
)
friend

Multiplication operator.

Parameters
afirst operand
bsecond operand
Returns
a * b

Definition at line 1886 of file half.hpp.

◆ operator+

f31 operator+ ( f31  a,
f31  b 
)
friend

Addition operator.

Parameters
afirst operand
bsecond operand
Returns
a + b

Definition at line 1858 of file half.hpp.

◆ operator-

f31 operator- ( f31  a,
f31  b 
)
friend

Subtraction operator.

Parameters
afirst operand
bsecond operand
Returns
a - b

Definition at line 1872 of file half.hpp.

◆ operator/

f31 operator/ ( f31  a,
f31  b 
)
friend

Division operator.

Parameters
afirst operand
bsecond operand
Returns
a / b

Definition at line 1897 of file half.hpp.

Member Data Documentation

◆ exp

int exp

exponent.

Definition at line 1905 of file half.hpp.

◆ m

uint32 m

mantissa as 1.31.

Definition at line 1904 of file half.hpp.


The documentation for this struct was generated from the following file: