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)
Porting: From Debian Armel Wheezy repository
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 do as explained below
- 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.
There is a detailed syntax using bases, scales, variables, operators, expressions, statements and functions.
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:- - 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)