Skip to content

Instantly share code, notes, and snippets.

@ChrisWhealy
Created April 29, 2016 17:11
Show Gist options
  • Save ChrisWhealy/51c6f28d27cf0632d7c6f6e6b500bbc9 to your computer and use it in GitHub Desktop.
Save ChrisWhealy/51c6f28d27cf0632d7c6f6e6b500bbc9 to your computer and use it in GitHub Desktop.
Mindshift: Part 19, sample 9
var DIV = dividend => divisor =>
NUMBER(NOT(XOR(SIGN(dividend))
(SIGN(divisor))))
(Y(do_div_magnitudes)
(ZERO_MAGNITUDE)
(PAIR(ABS(dividend))(ABS(divisor))));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment