home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16670 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!ebergman
  3. From: ebergman@nyx.cs.du.edu (Eric Bergman-Terrell)
  4. Subject: Re: BCD arithmetic
  5. Message-ID: <1992Nov17.151258.18158@mnemosyne.cs.du.edu>
  6. X-Disclaimer: Nyx is a public access Unix system run by the University
  7.     of Denver for the Denver community.  The University has neither
  8.     control over nor responsibility for the opinions of users.
  9. Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
  10. Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
  11. References: <1992Nov17.124233.20938@cs.joensuu.fi>
  12. Date: Tue, 17 Nov 92 15:12:58 GMT
  13. Lines: 26
  14.  
  15. In article <1992Nov17.124233.20938@cs.joensuu.fi> jmeri@cs.joensuu.fi (Juha Meriluoto) writes:
  16. >I am working on a project that needs BCD arithmetics.
  17. >Could anyone give me pointer(s) to BCD arithmetics packages
  18. >written in C (preferably public domain, I don't have money to
  19. >spend on this one...)  Thanks in advance!
  20.  
  21. There's a BCD class included with the Borland C++ compilers.  Also, there is
  22. BCD arithmetic built directly into the 8x87 family of math coprocessors.
  23. If you're willing to write maybe 20 lines of in-line assembly code you can
  24. use the hardware BCD instructions.  I don't know whether the 8x87 emulation
  25. library shipped with the Borland compiler emulates these instructions, or 
  26. whether the emu87.dll in windows does either - but if you have the math chip
  27. or an 80486 DX, you've everything you need.
  28.  
  29. Terrell
  30.  
  31. >
  32. >    JMe
  33. >
  34. >-- 
  35. >******************************************************************************
  36. >Juha Meriluoto    e-mail:   jmeri@cs.joensuu.fi
  37. >                  letters:  Nuottaniementie 16 A 9  80140 JOENSUU  FINLAND
  38. >                  phone:    +358-49-379040 
  39.  
  40.  
  41.