home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!microsoft!hexnut!jimad
- From: jimad@microsoft.com (Jim Adcock)
- Subject: Re: 128-bit math
- Message-ID: <1992Jul30.174540.8372@microsoft.com>
- Date: 30 Jul 92 17:45:40 GMT
- Organization: Microsoft Corporation
- References: <1992Jul25.145049.15951@ucc.su.OZ.AU> <1992Jul27.213012.17653@visus.com> <AVENGER.92Jul28134534@realsoon.WPI.EDU>
- Lines: 27
-
- In article <AVENGER.92Jul28134534@realsoon.WPI.EDU> avenger@realsoon.WPI.EDU (Sam Pullara) writes:
- >
- >Has anyone implemented a quad precision library for C++? How
- >difficult would something like this be?
-
- typedef short int16;
- typedef unsigned short uint16;
- typedef long int32;
- typedef unsigned long uint32;
-
- template <class LONG, class ULONG, class SHORT, class USHORT> class double_int
- {
- ....
- };
-
- template <class LONG, class ULONG, class SHORT, class USHORT> class double_uint
- {
- ....
- };
-
- typedef double_int<int32, uint32, int16, uint16> int64;
- typedef double_uint<int32, uint32, int16, uint16> uint64;
- typedef double_int<int64, uint64, int32, uint32> int128;
- typedef double_uint<int64, uint64, int32, uint32> uint128;
- typedef double_int<int128, uint128, int64, uint64> int256;
- typedef double_uint<int128, uint128, int64, uint64> uint256;
- ....
-