GNU bug report logs - #24561
Unmathematical bc exponentiation behavior

Previous Next

Package: coreutils;

Reported by: "Martens, Tobias" <tobias.martens <at> stud.uni-goettingen.de>

Date: Wed, 28 Sep 2016 17:32:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Erik Auerswald <auerswal <at> unix-ag.uni-kl.de>
To: "Martens, Tobias" <tobias.martens <at> stud.uni-goettingen.de>
Cc: 24561 <at> debbugs.gnu.org
Subject: bug#24561: Unmathematical bc exponentiation behavior
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.




This bug report was last modified 6 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.