vcpkg/ports/tfhe/mac-fix.patch
SeekingMeaning 5c0b7b5577 [tfhe] Fix Mac support (#9649)
* [tfhe] Fix Mac support

Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
2020-01-13 15:31:57 -08:00

14 lines
722 B
Diff

diff --git a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp
index 26de3f0..422c7f6 100644
--- a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp
+++ b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp
@@ -12,7 +12,7 @@ FFT_Processor_nayuki::FFT_Processor_nayuki(const int N): _2N(2*N),N(N),Ns2(N/2)
tables_reverse = fft_init_reverse(_2N);
omegaxminus1 = (cplx*) malloc(sizeof(cplx) * _2N);
for (int x=0; x<_2N; x++) {
- omegaxminus1[x]=cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i;
+ omegaxminus1[x]=cplx(cos(x*M_PI/N)-1., sin(x*M_PI/N)); // instead of cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i
//exp(i.x.pi/N)-1
}
}