> Date-Time Computations > > I have systems where native 64bit integers are not available. > > The 64bit data storage is a structure containing a 32-bit-high > and 32-bit-low integers. > > I would like to implement 64bit values on 32bit platforms. The > pressing need is to provide a Joda-Time or JDK date-time capability > in C/C++ for XPath libraries written in C++. Calendar operations > are currently a big frustration on 32bit platforms. > > Can such a 32bit composite structure be mapped and used as the > data for a 64bit microsecond clock value? > > Are there arithmetic functions available that can simulate 64bit > arithmetic on the composite structure when native 64bit is not > available to the platform? > > Integer arithmetic operation functions (Add, Subtract, Multiply, > Divide, Remainder, Modulo) should be capable of operating on > such composite values. The native 64bit operations should be > used if available to the platform. The simulated operations > should be used if 64bit integers are actually a composite > structure of two 32bit values. > > Sincerely, > Steven J. Hathaway >
More information on aribitrary-precision integer arithmetic is available at the GNU MP project (The GNU Multiple Precision Arithmetic Library). This is a multiple-precision library written in C for arbitrary precision arithmetic on integers, rational numbers, and floating-point numbers. For up-to-date information on GMP, see the web pages at: http://gmplib.org I have not tried to create a Microsoft Visual Studio build for GMP. The current build platforms use the GNU make library. Sincerely, Steven J. Hathaway
