Lines Matching refs:Decimal
134 from decimal import Decimal, ROUND_HALF_UP
178 x = (n * Decimal(100)) / d
179 return str(x.quantize(Decimal(".1"), rounding=ROUND_HALF_UP))
1188 if query.value(2) and Decimal(query.value(1)) <= Decimal(time):
1270 def __init__(self, collection, xbase=Decimal(0), ybase=Decimal(0)):
1280 x = float(Decimal(x) - self.xbase)
1281 y = float(Decimal(y) - self.ybase)
1286 return Decimal(x) + self.xbase
1289 return Decimal(y) + self.ybase
1414 self.yrangelo = Decimal(0)
1415 self.yrangehi = Decimal(1000)
2177 val = Decimal(val)
2179 return "{} s".format((val / 1000000000).quantize(Decimal("0.000000001")))
2181 return "{} ms".format((val / 1000000).quantize(Decimal("0.000001")))
2183 return "{} us".format((val / 1000).quantize(Decimal("0.001")))
2184 return "{} ns".format(val.quantize(Decimal("1")))
2281 time_from = time_from.quantize(Decimal(1))
2305 time_from = time_from.quantize(Decimal(1))
2306 time_to = time_to.quantize(Decimal(1))
2342 time_from = self.collection.xrangelo + Decimal(self.attrs.subrange.x.lo)
2343 time_to = self.collection.xrangelo + Decimal(self.attrs.subrange.x.hi)
3031 ipc = Decimal(float(insn_cnt) / cyc_cnt)
3032 ipc = str(ipc.quantize(Decimal(".01"), rounding=ROUND_HALF_UP))
4855 return Decimal(query.value(0))