shithub: oledsaver

ref: 9d8d932b97da40af6d4c21208f0e51ccccf093c4
dir: /bitart.c/

View raw version
#include <u.h>
#include <libc.h>
#include "bitart.h"

int
ob0(int x, int y)
{
	return ((-((-y) ^ (-x))) % (-((x - y) / (x / x)))) % 12;
}

int
ob1(int x, int y)
{
	return ((-((y^23)|(x%2)))-(((~y)*(~y))%((-x)+(y*x))))%7;
}

int
ob2(int x, int y)
{
	return ((-((x+23)-(-x)))%(~(~(14-y))))%6;
}

int
ob3(int x, int y)
{
	return ((-(-(x|x)))%(((-x)^(y+x))/((y/x)-(x^x))))%3;
}

int
ob4(int x, int y)
{
	return (((~(x/y))*(-(-y)))-(-((y-y)|(-x))))%11;
}

int
ob5(int x, int y)
{
	return (((-(y|y))/((-y)+(y&x)))/(((y*y)&(~x))+((x/y)&(13&x))))%4;
}

int
drand(int, int)
{
	return ntruerand(2);
}