An open API service indexing awesome lists of open source software.

https://github.com/rokerhro/xrm

XOR, (Bit-)Rotate, Multiply
https://github.com/rokerhro/xrm

mathematical-functions nerd riddle

Last synced: 9 months ago
JSON representation

XOR, (Bit-)Rotate, Multiply

Awesome Lists containing this project

README

          

# XOR, Rotate, Multiply

I'm looking for 6 parameters X1, X2, R1, R2, M1, M2 so that the nested function call is equivalent to addition:

```c++
// C++:
#include "xrm_template.cc"

XRM xrm1;
XRM xrm2;

ASSERT_TRUE( xrm1(xrm2(u)) == u+1 ); // for all u from 0 … 2⁶⁴-1
```