Movatterモバイル変換


[0]ホーム

URL:


homepage

Message85747

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authorjaredgrubb
Recipientsalexandre.vassalotti, amaury.forgeotdarc, christian.heimes, eric.smith, gvanrossum, jaredgrubb, mark.dickinson, nascheme, noam, preston, rhettinger, tim.peters
Date2009-04-07.21:02:00
SpamBayes Score9.099128e-06
Marked as misclassifiedNo
Message-id<1239138123.55.0.585460045597.issue1580@psf.upfronthosting.co.za>
In-reply-to
Content
The process that you describe inmsg85741 is a way of ensuring"memcmp(&x, &y, sizeof(x))==0", and it's portable and safe and is theRight Thing that we all want and expect. But that's not "x==y", as thatSun paper explains. It's close, but not technically accurate, as theimplication arrow only goes one way (just as "x=1/y" implies "xy=1" inalgebra, but not the other way around)I'd be interested to see if you could say that the Python objectmodel/bytecode interpretation enforces a certain quauntum of operationsthat actually does imply "eval(repr(x))==x"; but I suspect it'sunprovable, and it's fragile as Python grows to have more support inCLI/LLVM/JVM backends. My pedantic mind would strip any and all references to floating-pointequality out of the docs, as it's dangerous and insidiously misleading,even in "obvious" cases. But, I'll stop now :) (FYI: I've enjoyed the~100 messages here.. Great stuff!)
History
DateUserActionArgs
2009-04-07 21:02:04jaredgrubbsetrecipients: +jaredgrubb,gvanrossum,tim.peters,nascheme,rhettinger,amaury.forgeotdarc,mark.dickinson,eric.smith,christian.heimes,alexandre.vassalotti,noam,preston
2009-04-07 21:02:03jaredgrubbsetmessageid: <1239138123.55.0.585460045597.issue1580@psf.upfronthosting.co.za>
2009-04-07 21:02:02jaredgrubblinkissue1580 messages
2009-04-07 21:02:01jaredgrubbcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp