diff --git a/check/qlibs_cpp_test.cpp b/check/qlibs_cpp_test.cpp
index 606c9a5..dbf41e3 100644
--- a/check/qlibs_cpp_test.cpp
+++ b/check/qlibs_cpp_test.cpp
@@ -299,6 +299,7 @@ void test_ltisys( void )
void test_ffmath(void)
{
cout << "ffmath" << endl;
+ cout << ffmath::sqrt( 0.5f ) << endl;
cout << ffmath::exp( 0.5f ) << endl;
cout << ffmath::log( 0.5f ) << endl;
cout << ffmath::sin( 0.5f ) << endl;
@@ -328,7 +329,8 @@ void test_ffmath(void)
cout << ffmath::assoc_legendre( 2, 1, 0.5f ) << endl;
cout << ffmath::assoc_legendre( 2, 2, 0.5f ) << endl;
-
+ std::cout << "beta" << std::endl;
+ std::cout << ffmath::beta(0.123f, 1.0f - 0.123f) << std::endl;
std::cout << ffmath::beta(0.1f, 0.2f) << std::endl;
std::cout << "comp_ellint_1" << std::endl;
std::cout << ffmath::comp_ellint_1( 0.0f ) << std::endl;
diff --git a/check/sa_check.ewp b/check/sa_check.ewp
index 624ac46..2d92915 100644
--- a/check/sa_check.ewp
+++ b/check/sa_check.ewp
@@ -2237,6 +2237,9 @@
$PROJ_DIR$\..\src\include\pid.hpp
+
+ $PROJ_DIR$\..\src\include\qlibs_types.hpp
+
$PROJ_DIR$\..\src\include\rms.hpp
diff --git a/check/sa_check.ewt b/check/sa_check.ewt
index d681435..d844582 100644
--- a/check/sa_check.ewt
+++ b/check/sa_check.ewt
@@ -2967,6 +2967,9 @@
$PROJ_DIR$\..\src\include\pid.hpp
+
+ $PROJ_DIR$\..\src\include\qlibs_types.hpp
+
$PROJ_DIR$\..\src\include\rms.hpp
diff --git a/src/ffmath.cpp b/src/ffmath.cpp
index 1e5119c..9b5cc5c 100644
--- a/src/ffmath.cpp
+++ b/src/ffmath.cpp
@@ -12,9 +12,6 @@ struct limits {
constexpr uint32_t F32_NO_SIGN_MASK = 0x7FFFFFFFU;
constexpr uint32_t F32_SIGN_MASK = 0x80000000U;
-constexpr uint32_t F32_EXPONENT_MASK = 0x7F800000U;
-constexpr uint32_t F32_MANTISSA_MASK = 0x007FFFFFU;
-constexpr uint32_t F32_MANTISSA_NBITS = 23U;
using namespace qlibs;
@@ -1797,7 +1794,7 @@ float ffmath::comp_ellint_1( float k )
{
float y;
- if ( ffmath::isNan( k ) || ( absolute( k ) >= 1.0F ) ) {
+ if ( ffmath::isNan( k ) || ( absolute( k ) >= 1.0F ) ) { //no side effects
y = ffmath::getNan();
}
else {
diff --git a/src/include/interp1.hpp b/src/include/interp1.hpp
index 9ef556c..b3d08a7 100644
--- a/src/include/interp1.hpp
+++ b/src/include/interp1.hpp
@@ -3,11 +3,7 @@
* @author J. Camilo Gomez C.
* @version 1.01
* @note This file is part of the qLibs-cpp distribution.
- * @brief Helper class that implements a Tapped Delay Line (TDL). A TDL is a
- * delay line that provides access to its contents at arbitrary intermediate
- * delay length values.
- * This class runs in constant time O(1), so it becomes useful when you need to
- * work with long delayed lines.
+ * @brief 1D Interpolation Class
**/
#ifndef QLIBS_INTERP1
@@ -24,9 +20,9 @@ namespace qlibs {
* @{
*/
- /**
- * @brief An enum with all the available interpolation methods.
- */
+ /**
+ * @brief An enum with all the available interpolation methods.
+ */
enum interp1Method {
INTERP1_NEXT = 0, /*!< Return the next neighbor.*/
INTERP1_PREVIOUS, /*!< Return the previous neighbor.*/
@@ -170,6 +166,7 @@ namespace qlibs {
* @brief Interpolate input point @a x to determine the value of @a y
* at the points @a xi using the current method. If value is beyond
* the endpoints, extrapolation is performed using the current method.
+ * @param[in] x The input point.
* @return @c The interpolated-extrapolated @a y value.
*/
inline real_t get( const T x ) noexcept
diff --git a/src/interp1.cpp b/src/interp1.cpp
index 84ef3ff..f069595 100644
--- a/src/interp1.cpp
+++ b/src/interp1.cpp
@@ -20,7 +20,7 @@ bool interp1::setMethod( const interp1Method m ) noexcept
&interp1::cSpline,
};
- if ( ( m > 0 ) && ( m < INTERP1_MAX ) ) {
+ if ( ( m >= 0 ) && ( m < INTERP1_MAX ) ) {
method = im[ m ];
retValue = true;
}