This file contains classes and typedefs needed to provide uniform handling of floating point numeric values.
More...
Functions |
| static const complex< long double > | SimTK::zeroes (0) |
| bool | SimTK::isNaN (const float &x) |
| bool | SimTK::isNaN (const double &x) |
| bool | SimTK::isNaN (const long double &x) |
| template<class P > |
| bool | SimTK::isNaN (const std::complex< P > &x) |
| template<class P > |
| bool | SimTK::isNaN (const conjugate< P > &x) |
| bool | SimTK::isFinite (const float &x) |
| bool | SimTK::isFinite (const double &x) |
| bool | SimTK::isFinite (const long double &x) |
| template<class P > |
| bool | SimTK::isFinite (const std::complex< P > &x) |
| template<class P > |
| bool | SimTK::isFinite (const conjugate< P > &x) |
| bool | SimTK::isInf (const float &x) |
| bool | SimTK::isInf (const double &x) |
| bool | SimTK::isInf (const long double &x) |
| template<class P > |
| bool | SimTK::isInf (const std::complex< P > &x) |
| template<class P > |
| bool | SimTK::isInf (const conjugate< P > &x) |
| bool | SimTK::isNumericallyEqual (const float &a, const float &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Compare two floats for approximate equality.
|
| bool | SimTK::isNumericallyEqual (const double &a, const double &b, double tol=RTraits< double >::getDefaultTolerance()) |
| | Compare two doubles for approximate equality.
|
| bool | SimTK::isNumericallyEqual (const long double &a, const long double &b, double tol=RTraits< long double >::getDefaultTolerance()) |
| | Compare two long doubles for approximate equality.
|
| bool | SimTK::isNumericallyEqual (const float &a, const double &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Compare a float and a double for approximate equality at float precision.
|
| bool | SimTK::isNumericallyEqual (const double &a, const float &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Compare a float and a double for approximate equality at float precision.
|
| bool | SimTK::isNumericallyEqual (const float &a, const long double &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Compare a float and a long double for approximate equality at float precision.
|
| bool | SimTK::isNumericallyEqual (const long double &a, const float &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Compare a float and a long double for approximate equality at float precision.
|
| bool | SimTK::isNumericallyEqual (const double &a, const long double &b, double tol=RTraits< double >::getDefaultTolerance()) |
| | Compare a double and a long double for approximate equality at double precision.
|
| bool | SimTK::isNumericallyEqual (const long double &a, const double &b, double tol=RTraits< double >::getDefaultTolerance()) |
| | Compare a double and a long double for approximate equality at double precision.
|
| bool | SimTK::isNumericallyEqual (const float &a, int b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Test a float for approximate equality to an integer.
|
| bool | SimTK::isNumericallyEqual (int a, const float &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Test a float for approximate equality to an integer.
|
| bool | SimTK::isNumericallyEqual (const double &a, int b, double tol=RTraits< double >::getDefaultTolerance()) |
| | Test a double for approximate equality to an integer.
|
| bool | SimTK::isNumericallyEqual (int a, const double &b, double tol=RTraits< double >::getDefaultTolerance()) |
| | Test a double for approximate equality to an integer.
|
| bool | SimTK::isNumericallyEqual (const long double &a, int b, double tol=RTraits< long double >::getDefaultTolerance()) |
| | Test a long double for approximate equality to an integer.
|
| bool | SimTK::isNumericallyEqual (int a, const long double &b, double tol=RTraits< long double >::getDefaultTolerance()) |
| | Test a long double for approximate equality to an integer.
|
| template<class P , class Q > |
| bool | SimTK::isNumericallyEqual (const std::complex< P > &a, const std::complex< Q > &b, double tol=RTraits< typename Narrowest< P, Q >::Precision >::getDefaultTolerance()) |
| | Compare two complex numbers for approximate equality, using the numerical accuracy expectation of the narrower of the two precisions in the case of mixed precision.
|
| template<class P , class Q > |
| bool | SimTK::isNumericallyEqual (const conjugate< P > &a, const conjugate< Q > &b, double tol=RTraits< typename Narrowest< P, Q >::Precision >::getDefaultTolerance()) |
| | Compare two conjugate numbers for approximate equality, using the numerical accuracy expectation of the narrower of the two precisions in the case of mixed precision.
|
| template<class P , class Q > |
| bool | SimTK::isNumericallyEqual (const std::complex< P > &a, const conjugate< Q > &b, double tol=RTraits< typename Narrowest< P, Q >::Precision >::getDefaultTolerance()) |
| | Compare a complex and a conjugate number for approximate equality, using the numerical accuracy expectation of the narrower of the two precisions in the case of mixed precision.
|
| template<class P , class Q > |
| bool | SimTK::isNumericallyEqual (const conjugate< P > &a, const std::complex< Q > &b, double tol=RTraits< typename Narrowest< P, Q >::Precision >::getDefaultTolerance()) |
| | Compare a complex and a conjugate number for approximate equality, using the numerical accuracy expectation of the narrower of the two precisions in the case of mixed precision.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const std::complex< P > &a, const float &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular real float.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const float &a, const std::complex< P > &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular real float.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const std::complex< P > &a, const double &b, double tol=RTraits< typename Narrowest< P, double >::Precision >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular real double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const double &a, const std::complex< P > &b, double tol=RTraits< typename Narrowest< P, double >::Precision >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular real double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const std::complex< P > &a, const long double &b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular real long double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const long double &a, const std::complex< P > &b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular real long double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const std::complex< P > &a, int b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular integer.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (int a, const std::complex< P > &b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a complex number is approximately equal to a particular integer.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const conjugate< P > &a, const float &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular real float.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const float &a, const conjugate< P > &b, double tol=RTraits< float >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular real float.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const conjugate< P > &a, const double &b, double tol=RTraits< typename Narrowest< P, double >::Precision >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular real double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const double &a, const conjugate< P > &b, double tol=RTraits< typename Narrowest< P, double >::Precision >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular real double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const conjugate< P > &a, const long double &b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular real long double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const long double &a, const conjugate< P > &b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular real long double.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (const conjugate< P > &a, int b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular integer.
|
| template<class P > |
| bool | SimTK::isNumericallyEqual (int a, const conjugate< P > &b, double tol=RTraits< P >::getDefaultTolerance()) |
| | Test whether a conjugate number is approximately equal to a particular integer.
|
| | SimTK::SimTK_BNTCMPLX_SPEC (float, float) |
| | SimTK::SimTK_BNTCMPLX_SPEC (float, double) |
| | SimTK::SimTK_BNTCMPLX_SPEC (float, long double) |
| | SimTK::SimTK_BNTCMPLX_SPEC (double, float) |
| | SimTK::SimTK_BNTCMPLX_SPEC (double, double) |
| | SimTK::SimTK_BNTCMPLX_SPEC (double, long double) |
| | SimTK::SimTK_BNTCMPLX_SPEC (long double, float) |
| | SimTK::SimTK_BNTCMPLX_SPEC (long double, double) |
| | SimTK::SimTK_BNTCMPLX_SPEC (long double, long double) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (float, float) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (float, double) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (float, long double) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (double, float) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (double, double) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (double, long double) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (long double, float) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (long double, double) |
| | SimTK::SimTK_NTRAITS_CONJ_SPEC (long double, long double) |
| | SimTK::SimTK_DEFINE_REAL_NTRAITS (float) |
| | SimTK::SimTK_DEFINE_REAL_NTRAITS (double) |
| | SimTK::SimTK_DEFINE_REAL_NTRAITS (long double) |
This file contains classes and typedefs needed to provide uniform handling of floating point numeric values.
There are three numeric types: real, complex, conjugate and each comes in float, double, and long double precision. Each of these may be modified by a negator, which does not change the in-memory representation but negates the interpretation. Thus there are 18 distinct scalar types: 3 precisions each of real, complex, and conjugate and their negators.
* The Scalar Types
* ----------------
* Here is a complete taxonomy of the scalar types we support.
*
* <scalar> ::= <number> | negator< <number> >
* <number> ::= <standard> | <conjugate>
* <standard> ::= <real> | <complex>
*
* <real> ::= float | double | long double
* <complex> ::= complex< <real> >
* <conjugate> ::= conjugate< <real> >
*