[PATCH] fpcmp fix (wrt sqlite3)

Renato Golin renato.golin at linaro.org
Thu Apr 4 13:48:52 PDT 2013


bump


On 3 April 2013 19:07, Renato Golin <renato.golin at linaro.org> wrote:

> As reported in this bug:
>
> http://llvm.org/bugs/show_bug.cgi?id=15620
>
> fpcmp gets it wrong when comparing floating point numbers.
>
> I found that it happens when comparing numbers with different number of
> digits, ex:
>
> 257359.326881721
> 257359.32688172
>
> when fpcmp would compare the number with highest precision with the next
> one of the low precision.
>
> The attached patch works around this by rolling back one byte if the
> difference is in a space AND the previous one is a number. Since only one
> of the numbers can be at the space (the shorter one), I only roll back one
> the shorter one.
>
> This patch fixes sqlite3 on ARM and will probably fix on TILE-Gx, too.
>
> Please review.
>
> Thanks,
> --renato
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130404/ccbd71dd/attachment.html>


More information about the llvm-commits mailing list