Merge change 25818 into eclair

* changes:
  Clean up some debugging and add 2 math lib routines.