summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math/qa_sincos.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/math/qa_sincos.cc')
-rw-r--r--gnuradio-runtime/lib/math/qa_sincos.cc50
1 files changed, 26 insertions, 24 deletions
diff --git a/gnuradio-runtime/lib/math/qa_sincos.cc b/gnuradio-runtime/lib/math/qa_sincos.cc
index 4ce81fb4f8..52fbc53d3c 100644
--- a/gnuradio-runtime/lib/math/qa_sincos.cc
+++ b/gnuradio-runtime/lib/math/qa_sincos.cc
@@ -28,36 +28,38 @@
#include <boost/test/unit_test.hpp>
#include <cmath>
-BOOST_AUTO_TEST_CASE(t1) {
- static const unsigned int N = 1000;
- double c_sin, c_cos;
- double gr_sin, gr_cos;
+BOOST_AUTO_TEST_CASE(t1)
+{
+ static const unsigned int N = 1000;
+ double c_sin, c_cos;
+ double gr_sin, gr_cos;
- for(unsigned i = 0; i < N; i++) {
- double x = i/100.0;
- c_sin = sin(x);
- c_cos = cos(x);
+ for (unsigned i = 0; i < N; i++) {
+ double x = i / 100.0;
+ c_sin = sin(x);
+ c_cos = cos(x);
- gr::sincos(x, &gr_sin, &gr_cos);
+ gr::sincos(x, &gr_sin, &gr_cos);
- BOOST_CHECK_CLOSE(c_sin, gr_sin, 0.0001);
- BOOST_CHECK_CLOSE(c_cos, gr_cos, 0.0001);
- }
+ BOOST_CHECK_CLOSE(c_sin, gr_sin, 0.0001);
+ BOOST_CHECK_CLOSE(c_cos, gr_cos, 0.0001);
+ }
}
-BOOST_AUTO_TEST_CASE(t2) {
- static const unsigned int N = 1000;
- float c_sin, c_cos;
- float gr_sin, gr_cos;
+BOOST_AUTO_TEST_CASE(t2)
+{
+ static const unsigned int N = 1000;
+ float c_sin, c_cos;
+ float gr_sin, gr_cos;
- for(unsigned i = 0; i < N; i++) {
- float x = i/100.0;
- c_sin = sinf(x);
- c_cos = cosf(x);
+ for (unsigned i = 0; i < N; i++) {
+ float x = i / 100.0;
+ c_sin = sinf(x);
+ c_cos = cosf(x);
- gr::sincosf(x, &gr_sin, &gr_cos);
+ gr::sincosf(x, &gr_sin, &gr_cos);
- BOOST_CHECK_CLOSE(c_sin, gr_sin, 0.0001);
- BOOST_CHECK_CLOSE(c_cos, gr_cos, 0.0001);
- }
+ BOOST_CHECK_CLOSE(c_sin, gr_sin, 0.0001);
+ BOOST_CHECK_CLOSE(c_cos, gr_cos, 0.0001);
+ }
}