I am trying to round integers in python. I looked at the built-in round() function but it seems that that rounds floats.
My goal is to round integers to the closest ...
Is there is a simple, pythonic way of rounding to the nearest whole number without using floating point? I'd like to do the following but with integer arithmetic:
I've written a python module for ganglia that is returning response times. The raw times look like this:
0.0120489597321
I parse this with my python module and return the time as such:
Okay, basically I have a list of integers. I made a second list of those same integers, and divide it by a number. Now when I go back and multiply the second list by that number again, it isn't "exactly equal" to the first list. So if I have list 1 = [1.0, 2.0, 3.0, 4.0, 5.0] and list 2 * ...