Hello John,
thanks for clarifying this.
> This is not a scale bug. This is how the POSIX spec specifies
> the computation. The "10 * 2.1" ends up doing the computation
> with an effective scale of 1 ignoring the scale variable.
> In the division, that one uses the scale variable
Here is another message from upstream on this bug:
Here is the relavant part of the POSIX spec. scale is included, but
in a max(), not a min().
expression * expression
The result shall be the product of the two expressions. If a
and b are the scale
I reported this upstream and received this reply:
From: Phil Nelson <[EMAIL PROTECTED]>
Subject: Re: Bc Scale Bug
To: [EMAIL PROTECTED]
Date: Sun, 28 Jan 2007 17:04:18 -0800
Resent-From: [EMAIL PROTECTED]
On Sunday 28 January 2007 16:57, you wrote:
> $ echo "scale=0;
Hello John,
Am 2006-09-21 15:01:05, schrieb John Hasler:
> Michelle Konzack writes:
> > 1.06-8 which is installed on my laptop.
>
> You are saying that 1.06-8 works correctly? 1.06-15 has the bug here.
It seems, there are more then one bug...
Tested for some secondas...
In 1.06-8 I have the
Michelle Konzack writes:
> Since my old Laption run Woody, I do not know exactly...
Ok. We know the bug arrived between -8 and -15. I think I can narrow it
down from the changelog. Looks like it has to be either the bc.y patch or
a tool or library change.
--
John Hasler
[EMAIL PROTECTED]
Elm
Am 2006-09-21 14:27:20, schrieb John Hasler:
> In what version of bc did you first see the problem?
Since my old Laption run Woody, I do not know exactly, but I
uses the CD Sarge 3.1r0. Since many of my tools are plain
BASH scripts which are working properly since potato, I was
realy surprised,
I quoted:
There are four special variables, scale, ibase, obase, and last.
scale defines how _some_ operations use digits after the decimal
point.
Michelle Konzack writes:
> Which mean, "scale=0" will output N while "scale=2" output N.nn.
> Which it not does.
Note that it say
Michelle Konzack writes:
> 1.06-8 which is installed on my laptop.
You are saying that 1.06-8 works correctly? 1.06-15 has the bug here.
--
John Hasler
[EMAIL PROTECTED]
Elmwood, WI USA
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL P
Am 2006-09-20 15:55:32, schrieb John Hasler:
> > I have tried it under Woody and it works...
>
> What version?
1.06-8 which is installed on my laptop.
Thanks, Greetings and nice Evening
Michelle Konzack
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
#
Am 2006-09-20 13:10:53, schrieb John Hasler:
> Scale does not affect all operations. From the man page:
>
>There are four special variables, scale, ibase, obase, and last.
>scale defines how some operations use digits after the decimal
>point.
Which mean, "scale=0" will o
> I have tried it under Woody and it works...
What version?
--
John Hasler
[EMAIL PROTECTED]
Elmwood, WI USA
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
I will forward this upstream.
--
John Hasler
[EMAIL PROTECTED]
Elmwood, WI USA
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Hello Tobias and Maintainer,
Am 2006-09-20 19:22:54, schrieb Tobias Richter:
> Package: bc
> Version: 1.06-19
> Severity: normal
>
>
> scale is not always evaluated it seems:
>
> $ echo "scale=0; 10 * 2.1" | bc
> 21.0
> $ echo "scale=0; ( 10 * 2.1 ) / 1" | bc
> 21
>
> Shouldn't that yield '21'
Scale does not affect all operations. From the man page:
There are four special variables, scale, ibase, obase, and last.
scale defines how some operations use digits after the decimal
point.
--
John Hasler
[EMAIL PROTECTED]
Elmwood, WI USA
--
To UNSUBSCRIBE, email to [E
Package: bc
Version: 1.06-19
Severity: normal
scale is not always evaluated it seems:
$ echo "scale=0; 10 * 2.1" | bc
21.0
$ echo "scale=0; ( 10 * 2.1 ) / 1" | bc
21
Shouldn't that yield '21' twice?
I don't quite see a reason for the current behaviour, nor
could a quick look into the docs revea
15 matches
Mail list logo