Dnia 09-12-2007, N o godzinie 10:33 +0200, Noam Raphael pisze: > I think that the reason for the long representation is that it uses a > simple algorithm that makes "eval(repr(f)) == f" always true. However, > why not use another, a bit more complex, algorithm, which will still > preserve "eval(repr(f)) == f", but which will shorten the result when > it can?
"Printing Floating-Point Numbers Quickly and Accurately" Robert G. Burger, R. Kent Dybvig http://www.cs.indiana.edu/~burger/FP-Printing-PLDI96.pdf http://www.cs.indiana.edu/~burger/ I used this algorithm for my language Kogut. -- __("< Marcin Kowalczyk \__/ [EMAIL PROTECTED] ^^ http://qrnik.knm.org.pl/~qrczak/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com