Here is my attempt at the clog function. I also include the test code I used to check the edge cases. Feel free to critique and suggest changes, both the logic and the style. I copied some of the constructions from the csqrt function. I'll get started on measuring the ULP.