I need to install bc (I think this is a language so I am guessing I need to install a parser but I seriously have no clue - would I need to install anything else?) onto Ubuntu 12.04 and any additional maths extension that exists for it. The only place I found to try to download it from was from here which had insufficient instructions for me to be able to actually get this done. Looking around on the site the last update appears to be from the year 2000 which made me very wary of trying to install it and I am not even sure if this the place to get it from or not.

I ought to add I really have no clue what I am doing. I need an idiot's guide to the entire installation process.

1 Answer 1


Installing bc is trivial:

sudo apt-get install bc

As for extensions, man bc says:

   This version of bc was implemented from the POSIX P1003.2/D11 draft and
   contains several differences and extensions relative to the  draft  and
   traditional  implementations.

Indeed, the manpage is full of things marked 'extension'.

The maths extensions are applied using the -l option:

-l, --mathlib
      Define the standard math library.


$ bc <<<'c(10)'
Runtime error (func=(main), adr=6): Function c not defined.
$ bc -l <<<'c(10)'
  • Runtime error (func=(main), adr=6): Function c not defined.
    – CS QGB
    Commented Mar 3, 2023 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .