Skip to content

Instantly share code, notes, and snippets.

@gyk
Created November 12, 2018 05:43
Show Gist options
  • Save gyk/cc5bb6dbf4c7cd7a14c375bd7db9d736 to your computer and use it in GitHub Desktop.
Save gyk/cc5bb6dbf4c7cd7a14c375bd7db9d736 to your computer and use it in GitHub Desktop.
z = a x + b y + c x y + d
x = 0, z = 1 => b y + d === 1
x = 1, z = y => a + b y + c y + d === y
b y + d === 1 => b == 0, d == 1
a + c y === y - 1 => c == 1, a = -1 => z = -x + x y + 1 => z = 1 + x * (y - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment