diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-04-10 03:41:28 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-04-10 03:50:48 +0300 |
commit | 9e82d5ee56d258d33f59eb6fdcc363d8c0c47b4c (patch) | |
tree | a1c75db760bfd57c4051cc54352ed7eb65772fd3 /tests/monkey-test.apl | |
parent | c462509adfd68e8b849b8a6713360fb4f9026578 (diff) | |
download | sciteco-9e82d5ee56d258d33f59eb6fdcc363d8c0c47b4c.tar.gz |
testsuite: check whether comparisons for equality really work with the `a-b"=` idiom
* There might theoretically be problems with the uncommon one's complement or magnitude
representation of negative integers, but it's practically impossible to meet those in
the wild.
* Still, we do some checks now, so we will at least notice any exotic architectures.
* Also, documented the `a^#b"=` idiom for checking for equality.
It's longer to type, but faster and will also work for floats.
For floats it will be the only permissible idiom for checking for bitwise equality
as `a-b` can be 0 even if a!=b (if the difference is very small).
Changing the `-` semantics is out of the question.
Diffstat (limited to 'tests/monkey-test.apl')
0 files changed, 0 insertions, 0 deletions