Article View: net.micro.pc
Article #5483BCD math routines for C compilers
From: Bob Morse MLO5-2/B6 223-6720
Date: Mon, 27 Jan 1986 16:21
Date: Mon, 27 Jan 1986 16:21
13 lines
1274 bytes
1274 bytes
Does anyone know of any subroutine packages for C compilers (especially
Microsoft C 3.0) that handle large numbers encoded in BCD rather than
binary form? I am working on some accounting software which was
originally written in DRI's CBASIC-86, which uses a BCD-encoded floating
point scheme. It's quite useful to get exact decimal results rather than
the occasional penny errors which arise from the binary fractions in the
normal C "double" data type. Those who have used Lotus 123 spread
sheets for dollars and cents without careful attention to using the
@round(...) function will know what I mean!
Bob Morse
Technical Details
Message-ID:
<740@decwrl.DEC.COM>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!dec-rhea!dec-lews2!morseShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site decwrl.DEC.COM Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!dec-rhea!dec-lews2!morse From: morse@lews2.DEC (Bob Morse MLO5-2/B6 223-6720) Newsgroups: net.micro.pc Subject: BCD math routines for C compilers Message-ID: <740@decwrl.DEC.COM> Date: Mon, 27-Jan-86 11:21:07 EST Article-I.D.: decwrl.740 Posted: Mon Jan 27 11:21:07 1986 Date-Received: Wed, 29-Jan-86 04:03:24 EST Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation Lines: 13