[Numpy-discussion] A proposal to implement round in C Was: Rookie problems - Why is C-code much faster?

Bill Baxter wbaxter at gmail.com
Thu Feb 23 17:36:09 EST 2006


There doesn't seem to be any rint() round() or nearestint() defined in MSVC
7.1.  Can't find it in an MSDN search either.  I think that's why a lot of
people in the game biz, at least, use that lrintf function written using
intrinsics that I posted a link to earlier.  I first heard about that on the
gd-algorithms mailing list.

--Bill

On 2/24/06, Travis Oliphant <oliphant.travis at ieee.org> wrote:
>
> Sasha wrote:
>
> >Rint ufunc and ndarray metod "round" are in svn.  x.round(...) is
> >about 20x faster than around(x) for decimals=0 and about 6x faster for
> >decimals>0.  The case decimals<0   is slower on integers, but it
> >actually does something :-)
> >
> >
> Great job.  Thanks for adding this, Sasha...
>
> I think many will enjoy using it.
>
> Regarding portability:  On my system rint says it conforms to BSD 4.3.
> How portable is that?
>
> Can anyone try it out on say the MSVC compiler for windows?
>
> -Travis
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>



--
William V. Baxter III
OLM Digital
Kono Dens Building Rm 302
1-8-8 Wakabayashi Setagaya-ku
Tokyo, Japan  154-0023
+81 (3) 3422-3380
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20060223/a3f61a81/attachment.html>


More information about the NumPy-Discussion mailing list