mi sono reso conto che Decimal("1e30") crea un decimal a partire da un float, e non dal numero esatto come pensavo, comunque non ci sono differenze anche facendo:
>>> mean([Decimal("1"+"0"*30), 1, 3, Decimal("-1"+"0"*30)]) Decimal('0') questa era la discussione alla quale mi riferisco: https://mail.python.org/pipermail/python-dev/2005-June/054300.html > The rational proposal also has an intrinsic weakness shared with Java's > prior versions of BigDecimal which they found to be unworkable in practice. > The weakness was that repeated operations caused the internal number of > digits to grow beyond reason. ci sono dei benchmark? -- xmpp: berda...@gmail.com bitmessage: BM-2cTYXfGiSTsnx3righ6aHcJSWe4MV17jDP gpg fingerprint: 3F8D53518012716C4EEF7DF67B498306B3BF75A0 (used just for signing commits) _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python