iutest  1.17.99.14
クラス | 公開型 | 公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 全メンバ一覧
iutest::floating_point< RawType > クラステンプレート

浮動小数点数 [詳解]

#include <iutest_defs.hpp>

クラス

union  FInt
 

公開型

typedef IntType::Int Int
 
typedef IntType::UInt UInt
 
typedef RawType Float
 

公開メンバ関数

 floating_point ()
 コンストラクタ
 
 floating_point (RawType f)
 コンストラクタ [詳解]
 
 floating_point (const floating_point &rhs)
 コンストラクタ
 
bool AlmostEquals (const _Myt &rhs) const
 浮動小数点数がほぼ一致するかどうか
 
bool NanSensitiveAlmostEquals (const _Myt &rhs) const
 浮動小数点数がほぼ一致するかどうか [詳解]
 
bool AlmostNear (const _Myt &rhs, RawType max_abs_error) const
 浮動小数点数の差分が max_abs_error 以内に収まるかどうか
 
bool NanSensitiveAlmostNear (const _Myt &rhs, RawType max_abs_error) const
 浮動小数点数の差分が max_abs_error 以内に収まるかどうか
 
_Myt Abs (const _Myt &rhs) const
 
UInt bits () const
 ビット列の取得
 
UInt enable_bits () const
 ビット列の取得
 
RawType raw () const
 raw データの取得
 
UInt exponent_bits () const
 exponent
 
UInt fraction_bits () const
 fraction (mantissa)
 
UInt mantissa_bits () const
 mantissa
 
UInt economized_mantissa_bits () const
 economized mantissa
 
UInt sign_bit () const
 sign
 
bool is_nan () const
 is nan
 
bool is_inf () const
 is inf
 
 operator RawType () const
 cast to RawType
 
_Mytoperator= (RawType f)
 代入
 
_Mytoperator= (const _Myt &rhs)
 代入
 
bool operator== (RawType rhs) const
 比較
 
bool operator== (const _Myt &rhs) const
 比較
 

静的公開メンバ関数

static _Myt PINF ()
 plus inf
 
static _Myt NINF ()
 minus inf
 
static _Myt PNAN ()
 plus nan
 
static _Myt NNAN ()
 minus nan
 
static _Myt PQNAN ()
 plus qnan
 
static _Myt NQNAN ()
 minus qnan
 

静的公開変数類

static const int kEXP = detail::ieee754_bits<T>::EXP
 
static const int kMANT = detail::ieee754_bits<T>::MANT
 
static const int kDIGITS = detail::ieee754_bits<T>::MANT + detail::ieee754_bits<T>::MANT_HIDDEN
 

詳解

template<typename RawType>
class iutest::floating_point< RawType >

浮動小数点数

構築子と解体子

◆ floating_point()

template<typename RawType >
iutest::floating_point< RawType >::floating_point ( RawType  f)
inline

コンストラクタ

引数
[in]f= 浮動小数点数

関数詳解

◆ NanSensitiveAlmostEquals()

template<typename RawType >
bool iutest::floating_point< RawType >::NanSensitiveAlmostEquals ( const _Myt rhs) const
inline

浮動小数点数がほぼ一致するかどうか

参照
https://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
呼び出し関係図:
被呼び出し関係図:

このクラス詳解は次のファイルから抽出されました: