test/lit: Make abs() integration test slightly more interesting

I had accidentally not included this local diff in the PR that was
merged as commit cdaf554736.

Doesn't include tests for any of the interesting edge cases yet
(nans, infinities, signed zero, int.min), some of which might be
handled differently than by the host Python. In particular, the
select condition should logically use copysign(arg, 1) for the
comparison (i.e., always clear the sign bit), but currently the
chance of anyone running FP-heavy algorithms where this would
matter on the core device is close to zero [1].

[1] Sign of your choice.
This commit is contained in:
David Nadlinger 2019-04-14 04:12:37 +01:00
parent b4b9ec50b5
commit dc7a642b26
1 changed files with 2 additions and 2 deletions

View File

@ -3,5 +3,5 @@
assert abs(1234) == 1234 assert abs(1234) == 1234
assert abs(-1234) == 1234 assert abs(-1234) == 1234
assert abs(1234.0) == 1234.0 assert abs(1234.5) == 1234.5
assert abs(-1234.0) == 1234 assert abs(-1234.5) == 1234.5