summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-18 14:06:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-18 14:06:17 (GMT)
commitd7364d1f4bcb025930cf6d91cb2fe5787918bc41 (patch)
tree2d6a5d0e295ff78acb9fc9b3d15b6d340b6a8b21 /generic/tclBasic.c
parent303fbfc4be38a234f52db032c7cb87d0482e9cdc (diff)
parent176431f58481aeaba56e3463648fd85990236de4 (diff)
downloadtcl-d7364d1f4bcb025930cf6d91cb2fe5787918bc41.zip
tcl-d7364d1f4bcb025930cf6d91cb2fe5787918bc41.tar.gz
tcl-d7364d1f4bcb025930cf6d91cb2fe5787918bc41.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 5d434bd..24ffe3c 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -7426,8 +7426,8 @@ ExprRandFunc(
* Make sure 1 <= randSeed <= (2^31) - 2. See below.
*/
- iPtr->randSeed &= 0x7fffffff;
- if ((iPtr->randSeed == 0) || (iPtr->randSeed == 0x7fffffff)) {
+ iPtr->randSeed &= 0x7FFFFFFF;
+ if ((iPtr->randSeed == 0) || (iPtr->randSeed == 0x7FFFFFFF)) {
iPtr->randSeed ^= 123459876;
}
}
@@ -7595,8 +7595,8 @@ ExprSrandFunc(
*/
iPtr->flags |= RAND_SEED_INITIALIZED;
- iPtr->randSeed = (long) w & 0x7fffffff;
- if ((iPtr->randSeed == 0) || (iPtr->randSeed == 0x7fffffff)) {
+ iPtr->randSeed = (long) w & 0x7FFFFFFF;
+ if ((iPtr->randSeed == 0) || (iPtr->randSeed == 0x7FFFFFFF)) {
iPtr->randSeed ^= 123459876;
}
@@ -7689,9 +7689,9 @@ ClassifyDouble(
* Shifts and masks to use with the doubleMeaning variable above.
*/
-#define EXPONENT_MASK 0x7ff /* 11 bits (after shifting) */
+#define EXPONENT_MASK 0x7FF /* 11 bits (after shifting) */
#define EXPONENT_SHIFT 20 /* Moves exponent to bottom of word */
-#define MANTISSA_MASK 0xfffff /* 20 bits (plus 32 from other word) */
+#define MANTISSA_MASK 0xFFFFF /* 20 bits (plus 32 from other word) */
/*
* Extract the exponent (11 bits) and mantissa (52 bits). Note that we