Name: bc (Basic Calculator.. Bench Calculator)
Description: Command line based arbitrary precision calculator language, with syntax similar to C. Can be used as interactive shell or as scripting language.
History: Originally designed as a front end to dc (Desk Calculator) which used reverse polish notation.
Authors: Robert Morris and Lorinda Cherry (Unix version, 1975), Philip Nelson (GNU version, 1991)
Version: 1.06.95-9 (2014)
Library dependencies: libtinfo.so.5, libreadline.so.6
Works on: possibly all kindles. tested ok on pw1, pw3 and kt3.
Needs: Jailbroken Kindle with kterm installed
Features:
Instructions:
Usage:
See screenshots showing brief help and limits, pi calculated to 2000 places and a text mode Sierpinski fractal!
For more instructions and examples, see manual(inside zip) and links below.
Links:
Attachments:
Description: Command line based arbitrary precision calculator language, with syntax similar to C. Can be used as interactive shell or as scripting language.
History: Originally designed as a front end to dc (Desk Calculator) which used reverse polish notation.
Authors: Robert Morris and Lorinda Cherry (Unix version, 1975), Philip Nelson (GNU version, 1991)
Version: 1.06.95-9 (2014)
Library dependencies: libtinfo.so.5, libreadline.so.6
Works on: possibly all kindles. tested ok on pw1, pw3 and kt3.
Needs: Jailbroken Kindle with kterm installed
Features:
- - Arithmetic operators
- - Increment and decrement operators
- - Assignment operators
- - Comparision or Relational Operators
- - Logical or Boolean operators
- - Math Functions
- - Conditional statements
- - Iterative statements
- - Functions
Instructions:
- Unzip attached file bc-kual.zip into /mnt/us/extensions
- Select bc from KUAL menu
- In the kterm window enter bc as explained above
- Try ./sier.sh to generate text mode sierpinski triangles
Usage:
- - On the command line, like echo "1+2"|bc.
- - Interactively, by entering bc first.. then 1+2. Exit by entering quit.
- - By entering commands into a file.. then by entering bc < <filename>
- - Also, scripts containing functions can be loaded as parameters and the functions defined in these scripts will then be available in interactive or CLI mode.
- - There is a built-in library which is included by entering bc -l.
See screenshots showing brief help and limits, pi calculated to 2000 places and a text mode Sierpinski fractal!
For more instructions and examples, see manual(inside zip) and links below.
Links:
- https://www.gnu.org/software/bc/manu...l_mono/bc.html (GNU bc Command Manual)
- https://en.wikipedia.org/wiki/Bc_(programming_language) (wikipedia entry)
- http://phodd.net/gnu-bc/ (collection of bc functions)
- http://marcmmw.freeshell.org/esp/programacion/bc.html (spanish page explaining bc usage)
- http://www.numbertheory.org/gnubc/gnubc.html (usage of bc for number theory)
- http://x-bc.sourceforge.net/index.html (gui to bc with additional extensions)
- http://www.folkstalk.com/2012/09/bc-...nix-linux.html (usage examples)
- https://www.mkssoftware.com/docs/man1/bc.1.asp (manual)
- http://www.basicallytech.com/blog/ar...ions-using-bc/ (calculation examples)
- http://perso.ens-lyon.fr/philippe.theveny/cise.pdf (instructive paper on how arbitrary precision is required in certain cases)
Attachments:
- - bc-kual.zip (executable, library files and sample scripts ready for loading into KUAL, user manual in text format)
- - screenshots (brief help + limits, pi calculated to 2000 places, Text mode Sierpinski fractal)






