Support #1666
MachineInt: chase through ULL changes
Description
MachineInt
.Must chase though all changes:
- check all calls to
AsSignedLong
and/orAsUnsignedLong
- check all calls to
uabs
(change toul_abs
orull_abs
)
Related issues
History
#1 Updated by John Abbott about 2 years ago
- Related to Design #581: C++14: MachineInt added
#2 Updated by John Abbott about 2 years ago
We will need new tests too.
Oh joy! That C++ has inherited so many "complicated/confusing" integer types...
Designed for speed rather than safety.
I had also hoped that BOOST's numeric_cast
would have been adopted in the STL... not yet, it seems.
#3 Updated by John Abbott 2 months ago
- Target version changed from CoCoALib-0.99850 to CoCoALib-0.99900
#4 Updated by John Abbott 13 days ago
- Related to Design #1804: Use long long (at least sometimes)? added
#5 Updated by John Abbott 13 days ago
I wonder if this change should be reconsidered in light of the discussion in #1804?
#6 Updated by John Abbott 13 days ago
- Related to Design #934: MachineInt: change semantics? added
#7 Updated by John Abbott 13 days ago
- Related to Feature #828: MachineInt: function for checking that value is greater than some lower limit (and below MAXLONG) added
#8 Updated by John Abbott 12 days ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
I have just removed long long
from MachineInt
(and had to change one call in BigIntOps.C
)
There are actually 2 implementations of MachineInt
: one uses an internal repr wwhich is unsigned long
and a bool
to say whether the value was negative; the other uses signed long
without any extra bool
[I have not yet updated this alternative impl]
The alternative impl is "neater" (just 1 data field) and likely faster; but is such speed important if the value is anyway going to be converted to a RingElem
(or used in an operation with a RingElem
)?