From e90f377600d6097c6e37d0824f98bf60f77a0841 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Tue, 20 Sep 2022 09:30:34 +0100 Subject: [PATCH] Don't use drand48, it doesn't always exist and since we don't care about the quality of output, it's not worth testing for --- src/test/TestFFT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/TestFFT.cpp b/src/test/TestFFT.cpp index d915778..673758e 100644 --- a/src/test/TestFFT.cpp +++ b/src/test/TestFFT.cpp @@ -699,9 +699,9 @@ ALL_IMPL_AUTO_TEST_CASE(random) double *re_compare = new double[n/2 + 1]; double *im_compare = new double[n/2 + 1]; double *back = new double[n]; - srand48(0); + srand(); for (int i = 0; i < n; ++i) { - in[i] = drand48() * 4.0 - 2.0; + in[i] = (double(rand()) / double(RAND_MAX)) * 4.0 - 2.0; } USING_FFT(n); if (eps < 1e-11) {