• antirez's avatar
    Fix HINCRBYFLOAT to work with long doubles. · 71aa9b75
    antirez authored
    During the refactoring needed for lazy free, specifically the conversion
    of t_hash from struct robj to plain SDS strings, HINCRBFLOAT was
    accidentally moved away from long doubles to doubles for internal
    processing of increments and formatting.
    
    The diminished precision created more obvious artifacts in the way small
    numbers are formatted once we convert from decimal number in radix 10 to
    double and back to its string in radix 10.
    
    By using more precision, we now have less surprising results at least
    with small numbers like "1.23", exactly like in the previous versions of
    Redis.
    
    See issue #2846.
    71aa9b75
t_hash.c 26.3 KB