hand made floating point.
More...
#include <diyfp.hpp>
|
| constexpr | DiyFp () noexcept=default |
| | default constructor.
|
| |
| constexpr | DiyFp (const DiyFp &other) noexcept=default |
| | copy constructor.
|
| |
| constexpr DiyFp & | operator= (const DiyFp &other) noexcept=default |
| | copy assignment.
|
| |
| | DiyFp (double value) noexcept |
| | create floating point using double.
|
| |
| constexpr | DiyFp (uint64_t mantissa, int exponent) noexcept |
| | create floating point using mantissa and exponent.
|
| |
| | ~DiyFp ()=default |
| | destroy instance.
|
| |
| constexpr DiyFp & | normalize () noexcept |
| | normalize floating point.
|
| |
| constexpr void | normalizedBoundaries (DiyFp &minus, DiyFp &plus) const noexcept |
| | get normalized boundaries.
|
| |
| constexpr DiyFp & | operator-= (const DiyFp &rhs) noexcept |
| | minus operator
|
| |
| constexpr DiyFp & | operator*= (const DiyFp &rhs) noexcept |
| | multiplication operator.
|
| |
|
| static constexpr int | _diyMantissaSize = std::numeric_limits <uint64_t>::digits |
| | home made double mantissa size.
|
| |
| static constexpr int | _mantissaSize = std::numeric_limits <double>::digits - 1 |
| | double mantissa size.
|
| |
| static constexpr int | _exponentBias = 0x3FF + _mantissaSize |
| | exponent bias.
|
| |
| static constexpr uint64_t | _mantissaMask = 0x000FFFFFFFFFFFFFLLU |
| | mantissa mask.
|
| |
| static constexpr uint64_t | _exponentMask = 0x7FF0000000000000LLU |
| | exponent mask.
|
| |
| static constexpr uint64_t | _hiddenBit = 0x0010000000000000LLU |
| | hidden bit.
|
| |
hand made floating point.
◆ DiyFp() [1/4]
◆ DiyFp() [2/4]
| join::DiyFp::DiyFp |
( |
const DiyFp & | other | ) |
|
|
constexprdefaultnoexcept |
copy constructor.
- Parameters
-
◆ DiyFp() [3/4]
| join::DiyFp::DiyFp |
( |
double | value | ) |
|
|
inlineexplicitnoexcept |
create floating point using double.
- Parameters
-
◆ DiyFp() [4/4]
| join::DiyFp::DiyFp |
( |
uint64_t | mantissa, |
|
|
int | exponent ) |
|
inlineconstexprnoexcept |
create floating point using mantissa and exponent.
- Parameters
-
| mantissa | mantissa. |
| exponent | exponent. |
◆ ~DiyFp()
◆ normalize()
| DiyFp & join::DiyFp::normalize |
( |
| ) |
|
|
inlineconstexprnoexcept |
normalize floating point.
- Returns
- a reference of the current object.
◆ normalizedBoundaries()
| void join::DiyFp::normalizedBoundaries |
( |
DiyFp & | minus, |
|
|
DiyFp & | plus ) const |
|
inlineconstexprnoexcept |
get normalized boundaries.
- Returns
- normalized boundaries.
◆ operator*=()
| DiyFp & join::DiyFp::operator*= |
( |
const DiyFp & | rhs | ) |
|
|
inlineconstexprnoexcept |
multiplication operator.
- Parameters
-
- Returns
- a reference of the current object.
◆ operator-=()
| DiyFp & join::DiyFp::operator-= |
( |
const DiyFp & | rhs | ) |
|
|
inlineconstexprnoexcept |
minus operator
- Parameters
-
- Returns
- a reference of the current object.
◆ operator=()
| DiyFp & join::DiyFp::operator= |
( |
const DiyFp & | other | ) |
|
|
constexprdefaultnoexcept |
copy assignment.
- Parameters
-
- Returns
- a reference of the current object.
◆ _diyMantissaSize
| int join::DiyFp::_diyMantissaSize = std::numeric_limits <uint64_t>::digits |
|
staticconstexpr |
home made double mantissa size.
◆ _exponent
| int join::DiyFp::_exponent = 0 |
◆ _exponentBias
◆ _exponentMask
| uint64_t join::DiyFp::_exponentMask = 0x7FF0000000000000LLU |
|
staticconstexpr |
◆ _hiddenBit
| uint64_t join::DiyFp::_hiddenBit = 0x0010000000000000LLU |
|
staticconstexpr |
◆ _mantissa
| uint64_t join::DiyFp::_mantissa = 0 |
◆ _mantissaMask
| uint64_t join::DiyFp::_mantissaMask = 0x000FFFFFFFFFFFFFLLU |
|
staticconstexpr |
◆ _mantissaSize
| int join::DiyFp::_mantissaSize = std::numeric_limits <double>::digits - 1 |
|
staticconstexpr |
The documentation for this class was generated from the following file: