Salve a tutti, utilizzo python 2.7.2 in windows. Spesso uso l'interprete da shell come calcolatrice e poco fa ho notato un comportato strano facendo delle somme:
C:\Users\max>python Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a = 12.20 >>> b = 9.20 >>> c = 4.20 >>> print a + b + c 25.6 >>> >>> 12.20 + 9.20 + 4.20 25.599999999999998 >>> per quale motivo sommando direttamente gli addendi ottengo un risultato non corretto? E' un problema dell'interprete secondo voi? MC
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python