diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-23 15:10:45 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-05-23 15:10:45 -0700 |
commit | a7289ea510806bccbea5ad81288f86ac7e314c67 (patch) | |
tree | bdae36e50c9a3c0cef585cabe4f33f15cf08e637 /host/lib/include | |
parent | 13e71e2793a642d6af44411cd7b7678d84b35ac5 (diff) | |
download | uhd-a7289ea510806bccbea5ad81288f86ac7e314c67.tar.gz uhd-a7289ea510806bccbea5ad81288f86ac7e314c67.tar.bz2 uhd-a7289ea510806bccbea5ad81288f86ac7e314c67.zip |
fixup! uhdlib: add rational approximation to math utilities
Diffstat (limited to 'host/lib/include')
-rw-r--r-- | host/lib/include/uhdlib/utils/math.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/include/uhdlib/utils/math.hpp b/host/lib/include/uhdlib/utils/math.hpp index 24db23c50..bcb1b4395 100644 --- a/host/lib/include/uhdlib/utils/math.hpp +++ b/host/lib/include/uhdlib/utils/math.hpp @@ -62,7 +62,7 @@ std::pair<IntegerType, IntegerType> rational_approximation( // then repeating the algorithm on the fractional part of that mixed // number until a maximum number of terms or the fractional part is // nearly zero. - for (int i = 0; i < MAX_APPROXIMATIONS; ++i) { + for (size_t i = 0; i < MAX_APPROXIMATIONS; ++i) { double x = std::floor(1.0 / c); c = (1.0 / c) - x; |