round

Greg Willden gregwillden at gmail.com
Wed Oct 11 15:34:03 CDT 2006


On 10/11/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
>
> Perhaps you could explain *why* you want the schoolbook round? Given that
> floating point is inherently inaccurate you would have to expect to produce
> a lot of numbers exactly of the form x.5 *without errors*, which means you
> probably don't need round to deal with it. Anyway, absent a flag somewhere,
> you can do something like (x + sign(x)*.5).astype(int).
>


Yeah.  Forget it.  That was stupid of me to step into that one.
This has obviously been discussed before and you have good reasons for doing
it the way you do it.
Carry on.
Greg
-- 
Linux.  Because rebooting is for adding hardware.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061011/d85b64bd/attachment-0001.html 
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


More information about the Numpy-discussion mailing list