First, let me say I like these proposals. One comment below. On Feb 28, 2007, at 11:13 AM, William Stein wrote:
>> 2) Automatically switch into scientific notation if str() would >> otherwise have to add many many zeroes (my proposal would be to >> switch >> if the number of added zeroes exceeds the number of original digits). >> This also changes the result of hash(), but makes it constant time. >> (Try hash(0.5^1000000000) -- but be sure you do it on a machine with >> lots of memory.) > > Good idea. Doing hash = hash(str(x)) can be expensive (we used to do this on matrices...) and I would propose changing the hash to something like hash(mantissa) xor hash(valuation) (+ extras? I'd have to look into the exact equality stuff for comparing real numbers from several fields to make a serious proposal). Also, even in scientific notation it would display the fixed number of digits, right? - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
