Visa-Research / volepsi

Efficient Private Set Intersection base on VOLE
MIT License
98 stars 32 forks source link

Fix linear interpolation in SimpleIndex.cpp #57

Closed schoppmp closed 4 months ago

schoppmp commented 6 months ago

To interpolate f(x) linearly between f(x0) and f(x1), the correct equation is f(x) = 1 / (x1 - x0) * (x1 - x) * f(x0) + (x - x0) * f(x1). With x1 - x0 = 1 and diff := x - x0, this means f(x) = (1 - diff) * f(x0) + diff * f(x1).

ladnir commented 6 months ago

thanks, ill merge this soon.