In [1]:
import math

In [2]:
def round_towards_infinity(x):
    return int(math.copysign(math.ceil(abs(x)), x))

In [3]:
print(round_towards_infinity(10.123))


11

In [4]:
print(round_towards_infinity(-10.123))


-11

In [5]:
print(math.floor(10.123))


10

In [6]:
print(math.floor(-10.123))


-11

In [7]:
print(math.ceil(10.123))


11

In [8]:
print(math.ceil(-10.123))


-10

In [9]:
print(int(10.123))


10

In [10]:
print(int(-10.123))


-10