def float_to_exact_number_stored_in_computer(f): """ Given a float, return the exact number stored in computer.
See http://docs.python.org/3.1/tutorial/floatingpoint.html#representation-error """ from decimal import Decimal return Decimal.from_float(f) I've just borrowed from the doc, but that name is too long, isn't it? Please suggest something shorter but still meaningful. Thanks, Dick Moores
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
