• timour@mysql.com's avatar
    Fix for BUG#8576 · a6bf8c66
    timour@mysql.com authored
    The problem was in different representations of double variables depending on
    platform/compiler/compile options. In some cases double variables are represented by
    64 bits (while in memory), or by 80 bits (while in FPU register). As a result equal
    values are not considered "==". As many sources point out,  doubles should not be
    compared by '==' for this reason. This fix subtracts the scaled minimal double
    value X such that 1 + X != 1, to ensure that the inequality holds in any case.
    a6bf8c66
opt_range.cc 263 KB