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