
Entry #100051: How Machines Probably Do Itby Andrew M. Kasper
This solution implements in software what machines probably do in hardware.
DoAdd: Since floats are probably just represented as integers divided by some multiple of 10, this solution assumes that all input values are integers. It converts the values into a bitset, puts them through a custom ALU, converts them back into integers, converts that value into a float and then returns the float value. DoSub: Linearly searches x until DoAdd(x, op2) == op1. DoMul(x, y): Linearly performs temp = DoAdd(temp, y) x times. DoDiv: Linearly searches x until DoMul(x, op2) == op1. Download • 0 Comments 