Subject: bug#24561: Unmathematical bc exponentiation behavior

From: Erik Auerswald <[email-masked]>
Date: Thu, 29 Sep 2016 08:52:46 +0200

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.