Issue 7099: Decimal.is_normal should return True even for numbers with exponent > Emax (original) (raw)

Noticed by Stefan Krah:

Python 2.7a0 (trunk:75309, Oct 10 2009, 13:44:18) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information.

from decimal import * x = Decimal('9.99999999e+1000') c = getcontext() c.prec = 9 c.Emax = 999 c.Emin = -999

x.is_normal() False x.is_subnormal() False x.is_infinite() False x.is_nan() False x.is_zero() False

So if x isn't normal, subnormal, zero, nan or infinity, what the **** is it?!

x.is_normal() should probably be returning True here.