Ignore:
Timestamp:
05/22/06 15:49:54 (9 years ago)
Author:
xi
Message:

Revamp the inf/nan handling again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/constructor.py

    r170 r173  
    233233 
    234234    inf_value = 1e300 
    235     while repr(inf_value) != repr(inf_value*inf_value): 
     235    while inf_value != inf_value*inf_value: 
    236236        inf_value *= inf_value 
    237     nan_value = inf_value/inf_value 
     237    nan_value = -inf_value/inf_value   # Trying to make a quiet NaN (like C99). 
    238238 
    239239    def construct_yaml_float(self, node): 
Note: See TracChangeset for help on using the changeset viewer.