CInt96 v1.07
Welcome to CInt96, A freeware MFC class which provides an integer
class with 96 bit precision.
Features
- Provides constructors which convert between
all the basic types (including __int64) to CInt96.
- All the standard operators are provided
allowing the class to be used as if it was an intrinsic data type.
- Methods are provided to convert to and from
Hex, binary and decimal strings.
- Functions are available to allow individual
bits to be easily set or retrieved.
Usage
- To use the class in your code simply include
int96.cpp in your project and #include int96.h in which ever of your modules needs to make
calls to the classes.
- To use the serialization and string formatting functions of the class, your code will need to include MFC either statically or dynamically.
- To see the class in action, have a look at the code in main() in the
module "test.cpp".
History
V1.0 (11 July 1999)
V1.01 (17 October 1999)
- Fix for the function FormatAsDecimal which was failing when the
number starts with a "10".
V1.02 (26 October 1999)
- Fixed bug in operator!=.
- Fixed bug in operator^.
- Fixed bug in operator| .
- Fixed bug in operator&.
- All relational and equality operators now return "int" instead of BOOL.
- Provision of operators which convert back to basic C types.
- Improved the performance of operator*.
- Fixed problem with 0/0 which was returning 0 instead of the correct value undefined i.e. divide by 0 exception.
Thanks to G.J.E. Visser finding all these bugs
<g>.
V1.03 (28 October 1999)
- Fixed another bug in operator!=
- removed the use of MAXDWORD and replaced with 0xFFFFFFFF.
V1.04 (5 December 1999)
- Fixed problem with operator* which was giving incorrect
results in some cases, Thanks go to G.J.E. Visser for finding this.
V1.05 (20 November 2002)
- Updated the copyright message in the header and cpp file
- Added missing stdafx.h/cpp to the download zip file
- Fixed a logic error in the operator< and operator> methods when
comparing negative and positive values. Thanks to Steffen Offermann for reporting and fixing this problem.
V1.06 (26 March 2005)
- Code is now compatible with Cygwin/gcc. Note that the screen output
conversion and MFC archived functions have been ifdef'ed out. Thanks to David Moloney for this nice addition.
V1.07 (31 January 2006)
- Updated copyright details.
- Updated the code to exclude MFC specific logic using the preprocessor
macro _AFX instead of _GNUC__. This allows the core of the class to be used
in non MFC projects on windows compilers. Thanks to Larry Hastings for this
update.
- Updated documentation to use the same style as the web site.
Planned Enhancements
- Optimize the code through the use of
inlining and improved algorithms.
- Improve the sample app as at the moment it
just tests out most of the methods provided by CInt96.
- If you have any other suggested additions,
comments or bug fixes, please let me know so that I can try my best to incorporate them
into the next version of CInt96.
Contacting the Author
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
31 January 2006