Qrack  9.0
General classical-emulating-quantum development framework
Public Member Functions | Public Attributes | Friends | List of all members
half_float::detail::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)
 Constructor. More...
 
 f31 (unsigned int abs)
 Constructor. More...
 

Public Attributes

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

Friends

f31 operator+ (f31 a, f31 b)
 Addition operator. More...
 
f31 operator- (f31 a, f31 b)
 Subtraction operator. More...
 
f31 operator* (f31 a, f31 b)
 Multiplication operator. More...
 
f31 operator/ (f31 a, f31 b)
 Division operator. More...
 

Detailed Description

Class for 1.31 unsigned floating-point computation.

Constructor & Destructor Documentation

◆ f31() [1/2]

HALF_CONSTEXPR half_float::detail::f31::f31 ( uint32  mant,
int  e 
)
inline

Constructor.

Parameters
mantmantissa as 1.31
eexponent

◆ f31() [2/2]

half_float::detail::f31::f31 ( unsigned int  abs)
inline

Constructor.

Parameters
absunsigned half-precision value

Friends And Related Function Documentation

◆ operator*

f31 operator* ( f31  a,
f31  b 
)
friend

Multiplication operator.

Parameters
afirst operand
bsecond operand
Returns
a * b

◆ operator+

f31 operator+ ( f31  a,
f31  b 
)
friend

Addition operator.

Parameters
afirst operand
bsecond operand
Returns
a + b

◆ operator-

f31 operator- ( f31  a,
f31  b 
)
friend

Subtraction operator.

Parameters
afirst operand
bsecond operand
Returns
a - b

◆ operator/

f31 operator/ ( f31  a,
f31  b 
)
friend

Division operator.

Parameters
afirst operand
bsecond operand
Returns
a / b

Member Data Documentation

◆ exp

int half_float::detail::f31::exp

exponent.

◆ m

uint32 half_float::detail::f31::m

mantissa as 1.31.


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