From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Fj4AO-0005af-Tk for garchives@archives.gentoo.org; Thu, 25 May 2006 00:57:33 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k4P0v5Ao011725; Thu, 25 May 2006 00:57:05 GMT Received: from imf24aec.mail.bellsouth.net (imf24aec.mail.bellsouth.net [205.152.59.72]) by robin.gentoo.org (8.13.6/8.13.6) with ESMTP id k4P0pZ2m031626 for ; Thu, 25 May 2006 00:51:36 GMT Received: from ibm68aec.bellsouth.net ([65.4.154.146]) by imf24aec.mail.bellsouth.net with ESMTP id <20060525005134.RAQL15209.imf24aec.mail.bellsouth.net@ibm68aec.bellsouth.net> for ; Wed, 24 May 2006 20:51:34 -0400 Received: from gandalf ([65.4.154.146]) by ibm68aec.bellsouth.net with ESMTP id <20060525005133.KKFB15153.ibm68aec.bellsouth.net@gandalf> for ; Wed, 24 May 2006 20:51:33 -0400 From: "Brett I. Holcomb" Organization: Holcomb & Associates To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Getting BC not to truncate at the decimal point? Date: Wed, 24 May 2006 20:51:32 -0400 User-Agent: KMail/1.8.3 References: <20060524204625.WNLR4103.ibm67aec.bellsouth.net@mail.bellsouth.net> In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605242051.32646.brettholcomb@bellsouth.net> X-Archives-Salt: a115663c-cb82-4c23-94a2-6d55481a6073 X-Archives-Hash: 510f49709a238e22e359d260d5069090 You're welcome. Don't feel bad - it took me a "This thing can't be that dumb" and a man page read to find out it was smarter than I thought . On Wednesday May 24 2006 17:15, Mike Huber wrote: > duh, sorry, case of me not fully reading the manpage. I'll be sure and > fully read before I send to the list. > > Thanks a lot, > --Mike > > On 5/24/06, brettholcomb@bellsouth.net wrote: > > Did you try > > > > scale=n > > > > Where n is the number of digits after the decimal? More in man bc. > > > > > From: "Mike Huber" > > > Date: 2006/05/24 Wed PM 12:48:29 EDT > > > To: gentoo-user@lists.gentoo.org > > > Subject: [gentoo-user] Getting BC not to truncate at the decimal point? > > > > > > Hi, > > > I'm just trying to do some quick calculations using bc, but the > > > > version > > > > > installed through portage truncates on multiplication/division. It > > > > didn't > > > > > used to do this 2 years ago when I was taking number theory, and there > > > > are > > > > > no USE flags available for sys-devel/bc to change this. From the > > > > manpage: > > > --------------------------------------------------------------------- > > > > > > The most basic element in bc is the number. Numbers are arbitrary > > > > precision > > > > > numbers. This precision is both in the integer part and the > > > > fractional > > > > > part. All numbers are represented internally in decimal and all > > > > computation > > > > > is done in decimal. (This version truncates results from divide and > > > multiply operations.) There are two attributes of numbers, the length > > > > and > > > > > the scale. The length is the total number of > > > > significant decimal digits > > > > > in a number and the scale is the total number of decimal digits after > > > > the > > > > > decimal point. For example: > > > .000001 has a length of 6 and scale of 6. > > > 1935.000 has a length of 7 and a scale of 3. > > > > > > > > > ----------------------------------------------------------------------- > > >- > > > > > > > > > Anyone have any ideas? > > > > > > --Mike > > > > -- > > gentoo-user@gentoo.org mailing list -- Brett I. Holcomb -- gentoo-user@gentoo.org mailing list