• R
    fix incorrect use of fabs on long double operand in floatscan.c · bff78954
    Rich Felker 提交于
    based on patch by Dan Gohman, who caught this via compiler warnings.
    analysis by Szabolcs Nagy determined that it's a bug, whereby errno
    can be set incorrectly for values where the coercion from long double
    to double causes rounding. it seems likely that floating point status
    flags may be set incorrectly as a result too.
    
    at the same time, clean up use of preprocessor concatenation involving
    LDBL_MANT_DIG, which spuriously depends on it being a single unadorned
    decimal integer literal, and instead use the equivalent formulation
    2/LDBL_EPSILON. an equivalent change on the printf side was made in
    commit bff6095d.
    bff78954
floatscan.c 9.6 KB