lgtm I haven't been able to fully convince myself that the math is correct, but it does simplify the code and eliminate special cases. I still think we have a rewrite in the very near future, but this will be an easier reference to work from. http://reviews.llvm.org/D3410