mirror of
https://github.com/saymrwulf/uhd.git
synced 2026-05-16 21:10:10 +00:00
18 lines
367 B
C++
18 lines
367 B
C++
//
|
|
// Copyright 2014 Ettus Research LLC
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0
|
|
//
|
|
|
|
#include <boost/test/unit_test.hpp>
|
|
#include <stdint.h>
|
|
#include <uhd/utils/math.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);
|
|
}
|
|
|