<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - LLVM unit tests have error in random number handling"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106232#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - LLVM unit tests have error in random number handling"
href="https://bugs.freedesktop.org/show_bug.cgi?id=106232">bug 106232</a>
from <span class="vcard"><a class="email" href="mailto:sroland@vmware.com" title="Roland Scheidegger <sroland@vmware.com>"> <span class="fn">Roland Scheidegger</span></a>
</span></b>
<pre>(In reply to Jose Fonseca from <a href="show_bug.cgi?id=106232#c2">comment #2</a>)
<span class="quote">> It's been a long time, but I think Tom's right. This was a thinko, and my
> intent was the opposite.</span >
Ok that makes sense. With this code only reversing sign with signed type, we'd
still not test full unsigned range though for uint32 types (but not smaller
types), looking at this again.
<span class="quote">>
>
> > And float range is only from 0 to 2.0f?
>
> That's correct. That's sufficient to exercise the clamping.
>
> Remember that if we generated a range between 0 and a VERY_LARGE_NUMBER,
> then only 1/VERY_LARGE_NUMBER of the cases would actually be in the most
> interesting range of 0..1</span >
Ok, I think the problem is we don't know what we're going to convert to. If we
actually want to test float->int then we'd definitely want very large numbers
(in fact we'd wanted numbers which overflow the target type too) - values
between 0..2 aren't particularly interesting in this case. But for converting
to normalized this is right.
This code of course also does cases which are not really interesting and
probably not hit in practice, like unorm->unsigned (everything is 0 or 1 after
conversion).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>