not that interesting to be honest (basically just cramming values into 2 LUTs and looking them up) but for any solidity enjoyoors still around...: