Fix round

This is a follow-up to #493.

Apparently, round is not defined in c++98:
http://stackoverflow.com/questions/485525/round-for-float-in-c

which causes this error:
http://nipy.bic.berkeley.edu/builders/dipy-py2.7-win32/builds/124/steps/shell_5/logs/stdio

Using floor(x+0.5) may not be consistent with numpy, we also need to consider rounding to nearest even:
http://mathematica.stackexchange.com/questions/2116/why-round-to-even-integers

This solution uses the same procedure as for "dpy_log2", by borrowing code from numpy:
https://github.com/numpy/numpy/blob/master/numpy/core/src/npymath/npy_math.c.src

The code now builds in buildbot dipy-py2.7-win32:
http://nipy.bic.berkeley.edu/builders/dipy-py2.7-win32/builds/127/steps/shell_5/logs/stdio


Sounds good, thanx Omar.
On Dec 10, 2014 10:23 AM, "Omar Ocegueda" <notifications@github.com> wrote:

> In src/dpy_math.h
> <https://github.com/nipy/dipy/pull/494#discussion-diff-21623868>:
>
> > @@ -7,7 +7,7 @@
> >  #include "numpy/npy_math.h"
> >
> >  #define dpy_isnan npy_isnan
> > -#define dpy_log2 npy_log2
> > +#define dpy_signbit npy_signbit
>
> Ok!, in general, I don't see why we would need to override these basic
> numpy functions. I can do the changes to use npy_rint and npy_log2 as well,
> do you guys agree?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/494/files#r21623868>.
>