Extend LOG2 function to handle more cases, and make LOG call LOG2 appropriately, and add LOG2-DD to handle the double-double-float cases.