summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-06-29 05:26:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-06-29 05:26:36 -0700
commit8640f9c2b4405954aeac4af7f7606d5ea88b0440 (patch)
tree8e8b07b971d35f8cc2d9a3a7b96c4fe593c06b2f
parentcd0318a314d3912aa095d04752633e884ba901ee (diff)
downloadtxr-8640f9c2b4405954aeac4af7f7606d5ea88b0440.tar.gz
txr-8640f9c2b4405954aeac4af7f7606d5ea88b0440.tar.bz2
txr-8640f9c2b4405954aeac4af7f7606d5ea88b0440.zip
doc: eq, eql, equal cleanuip.
* txr.1: Mention that floating point numbers may be boxed or unboxed, and so may or may not be comparable with eq. Remove superfluous adjectives like actually and slightly.
-rw-r--r--txr.128
1 files changed, 20 insertions, 8 deletions
diff --git a/txr.1 b/txr.1
index af05e63c..d5ea3cc6 100644
--- a/txr.1
+++ b/txr.1
@@ -20947,18 +20947,30 @@ if and only if,
.meta left-obj
and
.meta right-obj
-are actually the same object. The
-.code eq
-test is implemented
-by comparing the raw bit pattern of the value, whether or not it is
-an immediate value or a pointer to a heaped object.
+are the same object.
+
Two character values are
.code eq
if they are the same character, and two fixnum integers
are
.code eq
-if they have the same value. All other object representations are actually
-pointers, and are
+if they have the same value.
+
+Whether two identical floating-point values are always
+.code eq
+depends on how \*(TX has been built.
+
+On 64 bit systems, \*(TX is usually built with to support unboxed floating-point
+numbers, which may be reliably compared with
+.codn eq .
+On 32 bit targets, floating-point values are pointers to heap-allocated values,
+and so two identical values might not be
+.codn eq .
+Note that even in 64 bit build of \*(TX, the build configuration can override
+the selection so that floating-point values are heap-allocated.
+
+All other object representations are
+pointers to heap-allocated objects. Two such values are
.code eq
if and only if they point to the same object in memory.
So, for instance, two bignum integers might not be
@@ -20972,7 +20984,7 @@ and two strings might not be eq even if they hold identical text.
The
.code eql
-function is slightly less strict than
+function is less strict than
.codn eq .
The difference between
.code eql