Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by adolgert

2 years ago

A select statement, in this case, looks like a ternary in C, "y = (x > 0) ? 1 : 0". In FHE with integers, it's evaluated by making a large polynomial all x <= 0 become 0 and all x>0 become 1. Once you have y, you evaluate both halves of the if-then but multiply one result by y and the other by (1-y). Then add them.

0 comments

adolgert

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities