[PATCH] fpcmp fix (wrt sqlite3)

Michael Gottesman mgottesman at apple.com
Thu Apr 4 16:47:55 PDT 2013


If you really want to test fpcmp, doing all 16 bit float comparisons could be accomplished in a reasonable amount of time.

Michael

On Apr 4, 2013, at 4:25 PM, Renato Golin <renato.golin at linaro.org> wrote:

> On 4 April 2013 22:25, Daniel Dunbar <daniel at zuster.org> wrote:
> I'm afraid of fpcmp the way it is written, so I'm hoping you did a fair amount of testing on it. :)
> 
> I concur, that's not pretty code. I ran the whole test-suite with it, thinking there would be enough cases to prove me wrong. All passed.
> 
> 
> 
> ddunbar at ozzy-2:tmp$ echo "1.234b" > a
> ddunbar at ozzy-2:tmp$ echo "1.2341" > b
> ddunbar at ozzy-2:tmp$ fpcmp -a=.1 a b
> fpcmp: FP Comparison failed, not a numeric difference between 'b' and '1'
> 
> True, this would make it fail, but I'm not sure how realistic it is on common outputs (and the reason why there wasn't a single example like that on the whole test-suite). However, I agree with you that if rolling back one digit breaks the comparison, it means they were different to begin with. I'll write the code a bit more generic and run some basic tests.
> 
> But I don't think this warranted a full test-suite on fpcmp. I'd rather spend more time later on it, if it fails on another case.
> 
> cheers,
> --renato
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130404/063c58f2/attachment.html>


More information about the llvm-commits mailing list