blob: ffdcbb086853e5f24cd70e321bae2e98bfe7cad2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//
// Copyright 2014 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#include <uhd/utils/math.hpp>
#include <stdint.h>
#include <boost/test/unit_test.hpp>
// NOTE: This is not the only math test case, see e.g. special tests
// for fp comparison.
BOOST_AUTO_TEST_CASE(test_log2)
{
double y = uhd::math::log2(16.0);
BOOST_CHECK_EQUAL(y, 4.0);
}
|