Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 Fluke 8/7/84; site fluke.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!microsoft!fluke!kurt From: kurt@fluke.UUCP (Kurt Guntheroth) Newsgroups: net.lang.c Subject: Accountants, Finance, Language Message-ID: <62@vax2.fluke.UUCP> Date: Wed, 21-Nov-84 12:09:29 EST Article-I.D.: vax2.62 Posted: Wed Nov 21 12:09:29 1984 Date-Received: Wed, 28-Nov-84 03:40:11 EST Organization: John Fluke Mfg. Co., Everett, WA Lines: 27 This bogus BCD thing crops up again and again. It poisoned the ANSI BASIC standard too. Won't you guys examine the NEEDS of financial people? Financial people want dollars and cents calculations that come out exact. The first thing that seems to come into people's minds when they hear ths is BCD floating point. BCD floating point is wasteful and slow and is probably not the best answer. Floating point will represent numbers that are both larger and smaller than financial people need, and doing exact calculations in floating point can lead to problems in roundoff, truncation, and so forth, even if the number is kept in BCD. What financial people 'need' is a fixed point representation. Fixed point numbers are like integers, only you get shifting of the product in a multiplication or the quotient in a division to make the decimal point line up in the right bit position. You get EXACT results, and an out-of-range number causes a very conventional integer over/underflow. Fixed point numbers can be manipulated in binary so they are optimally fast and densely encoded. Any architecture which handles integers can handle them. Now, will all the financial people on usenet who use C for their programming please raise their hand? Hmmmm. That's what I thought, not enough to make the effort of adding a new data type worth the trouble. Now can we get on to something else? -- Kurt Guntheroth John Fluke Mfg. Co., Inc. {uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!kurt