<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>If you really want to test fpcmp, doing all 16 bit float comparisons could be accomplished in a reasonable amount of time.</div><div><br></div><div>Michael</div><br><div><div>On Apr 4, 2013, at 4:25 PM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On 4 April 2013 22:25, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org" target="_blank">daniel@zuster.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I'm afraid of fpcmp the way it is written, so I'm hoping you did a fair amount of testing on it. :)</div></blockquote><div><br></div><div style="">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.</div>
<div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>ddunbar@ozzy-2:tmp$ echo "1.234b" > a<br>
</div><div>ddunbar@ozzy-2:tmp$ echo "1.2341" > b</div><div>ddunbar@ozzy-2:tmp$ fpcmp -a=.1 a b</div><div>fpcmp: FP Comparison failed, not a numeric difference between 'b' and '1'</div></div></blockquote>
<div><br></div><div style="">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.</div>
<div style=""><br></div><div style="">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.</div><div style=""><br></div><div style="">cheers,</div><div style="">
--renato</div></div></div></div>
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>