Skip to content

Commit

Permalink
Merge branch 'main' of github.com:QuState/PhastFT
Browse files Browse the repository at this point in the history
  • Loading branch information
smu160 committed Feb 16, 2024
2 parents 00824b2 + 25ce43a commit 8f502d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,5 @@ benches/benchmark-data.*
benches/*benchmarks_bar_plot*.png
benches/__pycache__
benches/elapsed_times.csv
benches/bench_fftw

5 changes: 4 additions & 1 deletion benches/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ void gen_random_signal(double* reals, double* imags, int num_amps) {
for (int i = 0; i < num_amps; ++i) {
double p_sqrt = sqrt(probs[i]);
double sin_a, cos_a;
sincos(angles[i], &sin_a, &cos_a);

double theta = angles[i];
sin_a = sin(theta);
cos_a = cos(theta);

double re = p_sqrt * cos_a;
double im = p_sqrt * sin_a;
Expand Down

0 comments on commit 8f502d6

Please sign in to comment.