home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11810 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.2 KB  |  38 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!microsoft!hexnut!jimad
  3. From: jimad@microsoft.com (Jim Adcock)
  4. Subject: Re: 128-bit math
  5. Message-ID: <1992Jul30.174540.8372@microsoft.com>
  6. Date: 30 Jul 92 17:45:40 GMT
  7. Organization: Microsoft Corporation
  8. References: <1992Jul25.145049.15951@ucc.su.OZ.AU> <1992Jul27.213012.17653@visus.com> <AVENGER.92Jul28134534@realsoon.WPI.EDU>
  9. Lines: 27
  10.  
  11. In article <AVENGER.92Jul28134534@realsoon.WPI.EDU> avenger@realsoon.WPI.EDU (Sam Pullara) writes:
  12. >
  13. >Has anyone implemented a quad precision library for C++?  How
  14. >difficult would something like this be?
  15.  
  16. typedef short int16;
  17. typedef unsigned short uint16;
  18. typedef long int32;
  19. typedef unsigned long uint32;
  20.  
  21. template <class LONG, class ULONG, class SHORT, class USHORT> class double_int
  22. {
  23.     ....
  24. };
  25.  
  26. template <class LONG, class ULONG, class SHORT, class USHORT> class double_uint
  27. {
  28.     ....
  29. };
  30.  
  31. typedef double_int<int32, uint32, int16, uint16> int64;
  32. typedef double_uint<int32, uint32, int16, uint16> uint64;
  33. typedef double_int<int64, uint64, int32, uint32> int128;
  34. typedef double_uint<int64, uint64, int32, uint32> uint128;
  35. typedef double_int<int128, uint128, int64, uint64> int256;
  36. typedef double_uint<int128, uint128, int64, uint64> uint256;
  37. ....
  38.