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 1Fj00E-0007gf-DH for garchives@archives.gentoo.org; Wed, 24 May 2006 20:30:46 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k4OKUDiw027967; Wed, 24 May 2006 20:30:13 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.13.6/8.13.6) with ESMTP id k4OKO2Ml008364 for ; Wed, 24 May 2006 20:24:03 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 4703064CA5 for ; Wed, 24 May 2006 20:24:02 +0000 (UTC) Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27261-01 for ; Wed, 24 May 2006 20:23:57 +0000 (UTC) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by smtp.gentoo.org (Postfix) with ESMTP id 8C6B8659C9 for ; Wed, 24 May 2006 16:48:30 +0000 (UTC) Received: by nf-out-0910.google.com with SMTP id k27so118182nfc for ; Wed, 24 May 2006 09:48:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=ZWY1LS5fbF4DkvRElOQkWQ1BFHWyTU91MeRoLKA9FsZjX0RLP3wUjT8YEABMP56104yOqsfkIKVTswAghzSZqWaGFwLDJwTbQvOx0teQqGfFZ6Urr31EnfkCgBxWNddHzKc+vB78RNxjsXk4omRhvj6sCbYcxZh6qmtj6UzB3L4= Received: by 10.49.20.8 with SMTP id x8mr5816784nfi; Wed, 24 May 2006 09:48:29 -0700 (PDT) Received: by 10.49.21.6 with HTTP; Wed, 24 May 2006 09:48:29 -0700 (PDT) Message-ID: Date: Wed, 24 May 2006 11:48:29 -0500 From: "Mike Huber" To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Getting BC not to truncate at the decimal point? 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: multipart/alternative; boundary="----=_Part_7123_14612545.1148489309594" X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Status: No, score=-1.251 required=5.5 tests=[AWL=0.973, BAYES_00=-2.599, HTML_30_40=0.374, HTML_MESSAGE=0.001] X-Spam-Score: -1.251 X-Spam-Level: X-Archives-Salt: c51eaa10-703f-4865-9cb2-400adc81de03 X-Archives-Hash: a8cd916ce9243411f10275ae040e576a ------=_Part_7123_14612545.1148489309594 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 precisio= n numbers. This precision is both in the integer part and the fractional part. All numbers are represented internally in decimal and all computatio= n 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 ------=_Part_7123_14612545.1148489309594 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,
   I'm just trying to do some quick calculations using bc,= but the version installed through portage truncates on multiplication/divi= sion.  It didn't used to do this 2 years ago when I was taking nu= mber theory, and there are no USE flags available for sys-devel/bc to chang= e this.  From the manpage:

-------------------------------------------------------------------= --

The most basic element in bc is the number.  Numbers ar= e arbitrary precision numbers.  This precision is both in the&nbs= p; integer  part  and  the fractional pa= rt.  All numbers are represented internally in decimal and all co= mputation is done in decimal.  ( This  version &n= bsp;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 deci= mal point.  For example:
            = ;   .000001 has a length of 6 and scale of 6.
  &nbs= p;            1935.0= 00 has a length of 7 and a scale of 3.


-------------------------= -----------------------------------------------


Anyone have any = ideas?

--Mike
------=_Part_7123_14612545.1148489309594-- -- gentoo-user@gentoo.org mailing list