bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30453: Bug in BC calculator version 1.07.1


From: Martin Møller Skarbiniks Pedersen
Subject: bug#30453: Bug in BC calculator version 1.07.1
Date: Wed, 14 Feb 2018 23:33:29 +0100

This is not a bug.
>From the man-page:

$ man bc | fgrep -A5 "expr * expr"
       expr * expr
              The result of the expression is the product of the two
expressions.

       expr / expr
              The  result  of  the  expression  is  the quotient of
the two expressions.  The scale of the result is the value of the
variable
              scale.


So expr * expr is not scaled but expr / expr is scaled.

Regards
Martin



On 14 February 2018 at 07:52, Thomas Bracken <address@hidden> wrote:
> Hello,
>
> Your BC calculator does not do any truncation for the scale value
>
> when it does a multiplication.  See example below.
>
> It works fine on division, but not on multiplication.
>

This is not a bug.
>From the man-page:

$ man bc | fgrep -A5 "expr * expr"
       expr * expr
              The result of the expression is the product of the two
expressions.

       expr / expr
              The  result  of  the  expression  is  the quotient of
the two expressions.  The scale of the result is the value of the
variable
              scale.


Regards
Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]