[Python-Dev] RE: -Dwarn, long->double overflow (was RE: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.219,1.220)

Tim Peters tim.one@home.com
Fri, 31 Aug 2001 17:40:18 -0400

>> I'm unclear on why we warn about classic division when a float
>> or complex is involved:

> ...
> This warning is intended for perusal by a tool (yet to create) that
> reads the warnings and can automatically fix your code by inserting
> the proper future division statements and/or replace / by //.

Got it now.  Thanks!  Cool idea, BTW.

>> I would like to add OverflowError when coercion of long to float
>> yields a senseless result.

> Sounds OK to me.

Anyone else object?

>> Third issue:  I don't see a *good* reason for the future-division
>>     x/(2*x)
>> above not to return 0.5 [when x is a large long].

> Sure, but I also don't see a good reason to make this a priority.
> It's a "don't care" corner of the language to me.

Then I'll leave it alone, but I can't understand this view (it's not like we
can claim we're victims of the platform C or libm here -- nonsense results
in such cases are on our heads, and an implementation that settles for total
loss of information when 53 good bits are obviously possible is at best