Closed xiaolixiaoyi closed 3 years ago
ABY does support the following operations on floating-point numbers of different precisions using BooleanCircuit::PutFPGate(): ADD, MUL, SUB, DIV, SIN, SQRT, EXP, EXP2, CMP, LN, LOG2, COS, SQR (as defined here)
There are some shift operations available for Boolean Circuits:
Hope that helps. Let me know if you have further questions.
@dd23 I guess the main difference lies in the declaration of operands and I tried to modify them. But I always encountered such problems as no member named PutFPGate
, expects argument of type, but argument has type
. I was wondering if you could give me some example?
Would be great to have a example with a SQRT!
There is an example for using floating-point gates: https://github.com/encryptogroup/ABY/blob/public/src/examples/float/abyfloat.cpp
I have just extended it in b21faaf81c99a3b08a41ff558726da03fb6a8b48 and added an example for SQRT as well. Hope this helps.
Cheers! Thank you very much.
I've been working with FPGates on the latest b21faaf commit. Would it be possible to have a different path to the circ folder then "../../bin/circ". Maybe putting it as variable somewhere?
Took some time, but since ede04f84158900831a020832bde91168852b6b63 it's now possible to specify the path to the circuits at runtime by passing it to the ABYParty constructor, e.g., like in the float example.
The default is still "../../bin/circ"
so the old examples and the current directory structure of the repo keeps on working.
Is there an example with an EXP FP gate? Or is there any way to view the intermediate float values in the shares for debugging?
There is currently no example for the EXP FP gate, but if you submit a pull request, we can include it in the repo.
I want to test the performance of addition and multiplication of real numbers in ABY. Is there built-in types for fixed-point or floating-point numbers in ABY? Does ABY support right shift or left shift operations for sharings?