Closed daimingY closed 5 years ago
Thanks for reporting. This looks interesting. As I am getting access to a macOS machine, could you please provide your c++ compiler and its version on both systems (g++ --version
)?
Also to be absolutely clear, have you changed any CMake configuration?
I installed globally and didn't change CMake configuration. I installed g++ on Linux from sudo add-apt-repository ppa:ubuntu-toolchain-r/test
and downloaded Xcode 10.1 for macOS.
Linux:
g++ (Ubuntu 8.3.0-16ubuntu3~16.04) 8.3.0
maxOS:
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Thanks for the interesting bug report! :)
The problem was in native/src/seal/ckks.cpp in the constructor of CKKSEncoder. This used a complex
I implemented the same code in both Linux and macOS, but the results are different. Here's a small example to show the difference: Just push back the value
-11668621335293.000000
785 times into a vector, encrypt then decrypt the value, and the results are different between Linux and macOS. The Linux version resulted with a much larger fluctuation.macOS version: 10.13.6 Linux version: Ubuntu 16.04.6 LTS
Scheme is CKKS,
poly_modulus_degree
32768.Here's the code (the
utils.h
is used forprint_parameters
andprint_vector
as in \examples):The results from macOS:
The results from Linux:
What could cause this difference?