Skip to content

Commit 25ce43a

Browse files
authored
Merge pull request #11 from dmtrinh/main
Swapped out use of sincos() for more portability across platforms
2 parents a8d9485 + 9c3ffb0 commit 25ce43a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,5 @@ benches/benchmark-data.*
183183
benches/*benchmarks_bar_plot*.png
184184
benches/__pycache__
185185
benches/elapsed_times.csv
186+
benches/bench_fftw
187+

benches/main.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ void gen_random_signal(double* reals, double* imags, int num_amps) {
4646
for (int i = 0; i < num_amps; ++i) {
4747
double p_sqrt = sqrt(probs[i]);
4848
double sin_a, cos_a;
49-
sincos(angles[i], &sin_a, &cos_a);
49+
50+
double theta = angles[i];
51+
sin_a = sin(theta);
52+
cos_a = cos(theta);
5053

5154
double re = p_sqrt * cos_a;
5255
double im = p_sqrt * sin_a;

0 commit comments

Comments
 (0)