Indeed, it is a bit like testing equality of doubles in C/C++
Nigel
On 21/02/2022 11:05, abdelrahaman aly wrote:
> So there is your problem ;). So in general, is not highly recommended to
> do equality tests with fixed point, as mantisas could slightly change.
> *Why is this happening:*
> Note that the truncation in the sfix is probabilistic in nature, which
> means, that even if you do the same operation on the same data, the last
> bit sometimes might change. You could of course, no longer use the
> default probabilistic truncation (PRTrunc) and instead Trunc, however
> that will come with a small penalty in terms of performance. However
> that will not completely guarantee the outputs to be equal if/when your
> operations tree becomes intractable.
>
> Kr,
> Abdel
>
>> On 21 Feb 2022, at 1:55 PM, Davide Ferrari <
davide....@unipr.it
>> <mailto:
davide....@unipr.it>> wrote:
>>
>> Hi, for px.v i get 5242880 while for xc.v it sometimes differs by one
>> unit (5242881, 5242879).
>>
>> Il giorno lunedì 21 febbraio 2022 alle 10:14:54 UTC+1
>>
abdelrah...@gmail.com <
http://gmail.com> ha scritto:
>> <
https://groups.google.com/d/msgid/spdz/55f4670f-9c15-4968-acdc-6d7a3ddfb0ccn%40googlegroups.com?utm_medium=email&utm_source=footer
>> <
https://groups.google.com/d/topic/spdz/3KkYdDkJkuI/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to
>>
https://groups.google.com/d/msgid/spdz/3acbd75e-7e9a-4993-9a44-1f5ca5fe8f55n%40googlegroups.com
>> <
https://groups.google.com/d/msgid/spdz/3acbd75e-7e9a-4993-9a44-1f5ca5fe8f55n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "SPDZ/SCALE-MAMBA Discussion Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
spdz+uns...@googlegroups.com
> <mailto:
spdz+uns...@googlegroups.com>.
> To view this discussion on the web, visit
>
https://groups.google.com/d/msgid/spdz/C9C6D068-B731-437B-9353-BA2E93FFEA68%40gmail.com
> <
https://groups.google.com/d/msgid/spdz/C9C6D068-B731-437B-9353-BA2E93FFEA68%40gmail.com?utm_medium=email&utm_source=footer>.