scikit-learn/scikit-learn — pull request #1529 by vene (2013-01-07 03:55:41+00:00)
Title: [WIP] Added lgamma Cython interface to utils for MSVC

My second try, this time more successful.

*The backstory*:

`lgamma`, the logarithm of the gamma function, is not available in `math.h` under MSVC, which makes the current master not build under Windows.

In another PR (#1526) I tried bundling more and more of `fdlibm`, until I gave up, seeing how it gave wrong results on windows. Now, instead of bundling a whole library, I got everything that's needed in a single C file, and wrote a Cython wrapper for it.

It builds and returns accurate results on both my MacOS X as well.

As a little bonus, this helped me figure out why it wasn't working properly before (see discussion below)