Int¶
round up¶
https://stackoverflow.com/questions/2356501/how-do-you-round-up-a-number
round(2.3) # 2.0
int(2.3 + .5) # 2
math.ceil(4.2) # return int (python3) or float (python2)?
np.ceil(2.3)
float precision¶
// rounding down¶
floor division (also sometimes known as integer division). divide the first argument by the second and round the result down to the nearest whole number, equvalent to math.floor?
- if one of the operands is a float in floor division, then the output will be a float