fs = ['11.544', '11.545', '11.546']

def convert(f, nd):
    nd = f.find('.') + nd
c1 = decimal.getcontext().copy()
c1.rounding = decimal.ROUND_HALF_UP
c1.prec = nd
d1 = c1.create_decimal(f)
c2 = decimal.getcontext().copy()
c2.rounding = decimal.ROUND_HALF_DOWN
c2.prec = nd
d2 = c2.create_decimal(f)
print(d1, d2)
for f in fs:
    convert(f, 2)
Emulate floating point string conversion behaviour of Linux on Windows