File tree 6 files changed +16
-14
lines changed
6 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,7 @@ void test_ltisys( void )
299
299
void test_ffmath (void )
300
300
{
301
301
cout << " ffmath" << endl;
302
+ cout << ffmath::sqrt ( 0 .5f ) << endl;
302
303
cout << ffmath::exp ( 0 .5f ) << endl;
303
304
cout << ffmath::log ( 0 .5f ) << endl;
304
305
cout << ffmath::sin ( 0 .5f ) << endl;
@@ -328,7 +329,8 @@ void test_ffmath(void)
328
329
cout << ffmath::assoc_legendre ( 2 , 1 , 0 .5f ) << endl;
329
330
cout << ffmath::assoc_legendre ( 2 , 2 , 0 .5f ) << endl;
330
331
331
-
332
+ std::cout << " beta" << std::endl;
333
+ std::cout << ffmath::beta (0 .123f , 1 .0f - 0 .123f ) << std::endl;
332
334
std::cout << ffmath::beta (0 .1f , 0 .2f ) << std::endl;
333
335
std::cout << " comp_ellint_1" << std::endl;
334
336
std::cout << ffmath::comp_ellint_1 ( 0 .0f ) << std::endl;
Original file line number Diff line number Diff line change 2237
2237
<file >
2238
2238
<name >$PROJ_DIR$\..\src\include\pid.hpp</name >
2239
2239
</file >
2240
+ <file >
2241
+ <name >$PROJ_DIR$\..\src\include\qlibs_types.hpp</name >
2242
+ </file >
2240
2243
<file >
2241
2244
<name >$PROJ_DIR$\..\src\include\rms.hpp</name >
2242
2245
</file >
Original file line number Diff line number Diff line change 2967
2967
<file >
2968
2968
<name >$PROJ_DIR$\..\src\include\pid.hpp</name >
2969
2969
</file >
2970
+ <file >
2971
+ <name >$PROJ_DIR$\..\src\include\qlibs_types.hpp</name >
2972
+ </file >
2970
2973
<file >
2971
2974
<name >$PROJ_DIR$\..\src\include\rms.hpp</name >
2972
2975
</file >
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ struct limits {
12
12
13
13
constexpr uint32_t F32_NO_SIGN_MASK = 0x7FFFFFFFU ;
14
14
constexpr uint32_t F32_SIGN_MASK = 0x80000000U ;
15
- constexpr uint32_t F32_EXPONENT_MASK = 0x7F800000U ;
16
- constexpr uint32_t F32_MANTISSA_MASK = 0x007FFFFFU ;
17
- constexpr uint32_t F32_MANTISSA_NBITS = 23U ;
18
15
19
16
using namespace qlibs ;
20
17
@@ -1797,7 +1794,7 @@ float ffmath::comp_ellint_1( float k )
1797
1794
{
1798
1795
float y;
1799
1796
1800
- if ( ffmath::isNan ( k ) || ( absolute ( k ) >= 1 .0F ) ) {
1797
+ if ( ffmath::isNan ( k ) || ( absolute ( k ) >= 1 .0F ) ) { // no side effects
1801
1798
y = ffmath::getNan ();
1802
1799
}
1803
1800
else {
Original file line number Diff line number Diff line change 3
3
* @author J. Camilo Gomez C.
4
4
* @version 1.01
5
5
* @note This file is part of the qLibs-cpp distribution.
6
- * @brief Helper class that implements a Tapped Delay Line (TDL). A TDL is a
7
- * delay line that provides access to its contents at arbitrary intermediate
8
- * delay length values.
9
- * This class runs in constant time O(1), so it becomes useful when you need to
10
- * work with long delayed lines.
6
+ * @brief 1D Interpolation Class
11
7
**/
12
8
13
9
#ifndef QLIBS_INTERP1
@@ -24,9 +20,9 @@ namespace qlibs {
24
20
* @{
25
21
*/
26
22
27
- /* *
28
- * @brief An enum with all the available interpolation methods.
29
- */
23
+ /* *
24
+ * @brief An enum with all the available interpolation methods.
25
+ */
30
26
enum interp1Method {
31
27
INTERP1_NEXT = 0 , /* !< Return the next neighbor.*/
32
28
INTERP1_PREVIOUS, /* !< Return the previous neighbor.*/
@@ -170,6 +166,7 @@ namespace qlibs {
170
166
* @brief Interpolate input point @a x to determine the value of @a y
171
167
* at the points @a xi using the current method. If value is beyond
172
168
* the endpoints, extrapolation is performed using the current method.
169
+ * @param[in] x The input point.
173
170
* @return @c The interpolated-extrapolated @a y value.
174
171
*/
175
172
inline real_t get ( const T x ) noexcept
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ bool interp1::setMethod( const interp1Method m ) noexcept
20
20
&interp1::cSpline,
21
21
};
22
22
23
- if ( ( m > 0 ) && ( m < INTERP1_MAX ) ) {
23
+ if ( ( m >= 0 ) && ( m < INTERP1_MAX ) ) {
24
24
method = im[ m ];
25
25
retValue = true ;
26
26
}
You can’t perform that action at this time.
0 commit comments