diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-18 13:54:06 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-18 13:54:06 (GMT) |
| commit | 176431f58481aeaba56e3463648fd85990236de4 (patch) | |
| tree | acd54df49d264cc7ceef526685b300026bcf7ed7 /generic/tclBasic.c | |
| parent | ae243c85b7e7b470ea541cce41e76cd2cd7474f6 (diff) | |
| parent | af7fa225c1d0ec592c7af29ead5922f45c1c15fb (diff) | |
| download | tcl-176431f58481aeaba56e3463648fd85990236de4.zip tcl-176431f58481aeaba56e3463648fd85990236de4.tar.gz tcl-176431f58481aeaba56e3463648fd85990236de4.tar.bz2 | |
Merge 8.6
Diffstat (limited to 'generic/tclBasic.c')
| -rw-r--r-- | generic/tclBasic.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8597370..6c14f45 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -8182,8 +8182,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; } } @@ -8351,8 +8351,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; } @@ -8445,9 +8445,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 |
