bug-coreutils
[Top][All Lists]
Advanced

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

bug#24561: Unmathematical bc exponentiation behavior


From: Erik Auerswald
Subject: bug#24561: Unmathematical bc exponentiation behavior
Date: Thu, 29 Sep 2016 08:52:46 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Tobias,

On Wed, Sep 28, 2016 at 03:48:27PM +0000, Martens, Tobias wrote:
> echo "-(1)^2" | bc
> 1
> 
> I would have expected -1. This behavior is unmathematical and very
> confusing, because otherwise bc acts quite logic.

bc did exactly what you asked it to do. You probably meant to write:

    echo "-(1^2)" | bc

Thanks,
Erik
-- 
If it ain't broke, don't fix it.





reply via email to

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