[Piglit] [PATCH] builtin_function*py: more test data for "trunc"

Eric Anholt eric at anholt.net
Tue May 3 19:39:41 UTC 2016


Andres Gomez <agomez at igalia.com> writes:

> When performing a trunc op in a float value there is, basically, three
> scenarios: when the exponent is < 0, when it is > bitsize of the
> significand or with a value in the middle. Current generator was using
> data for values in the middle and < 0 but not for the last case so we
> add now a couple of values in that range and also the interesting 0.0
> special value.

Yeah, the testing for trunc/floor/ceil are really weak.  It would also
be relevant to test values with exponents >= 32, to catch
implementations trying to use casting to an integer.

Still, improvements are good:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160503/ac883436/attachment.sig>


More information about the Piglit mailing list