BKGcalc Reference

The mathematical models - though seemingly accurate - have not been tested to the level one would require for importiant matters involving life-and-limb, finances, etc. This software is proved for "entertainment purposes only", and is given "AS-IS" with no warranty expressed or implied. On second thought, it probibly doesn't work at all. Go use an abicus or something instead.

The Basics

Lines typed in the command line (bottom) are sent the bottom of the display area - similar to how entries typed into an adding machine are added to the end of an adding machine tape. After a line is entered the new "total" is placed in the display area.

Each line entered can be a value/number, an expression, or a continuation of the previous running "total" on the "tape". For example:

Continuation-type entry

100
100.
+20
120.

((6-4)*(1+2))
6.
1+2+3
6.

Expression-Type entry

The variable "ans" can be used to reference the preceding "answer" on the display. For example:

100+200
300.
ans-25
275

Using "ANS"

Numerical Entry

Values may be entered in one of several different ways:

  • Standard numbers - such as "22", "33.43" or "-12.33"
  • Hexidecimal numbers must be preceded by a "0x". For example "0x300".
  • Scientific Notation - such as "12e-6".
  • Engineering Notation - using engineering notation symbols (See "Engineering Base" below) such as "1k" or "100M".
  • Standard Operators

    Arithmetic Operators

  • + Addition
  • - Minus
  • * Times
  • / Divide
  • # Remainder
  • ^ Power
  • Boolean Operators

  • & Bitwise-And
  • | Bitwise-Or
  • < Bit Shift Left
  • > Bit Shift Right
  • Modes of Operation

    There are various modes that BKGcalc can run it to affect its operation. The current settings of the modes are displayed directly below the blue horizontal line. They are as folows:

    Modes
    Angle Mode Degrees or Radians Describes what the values in trigonometric functions will be expressed in
    Display Mode Sci, Eng, Dec or Hex Describes the format used to display data
    Engineering Base Comp or Norm Describes base (1000 or 104) for engineering notation

    Angle Mode

    Angle mode defines the type of units that will be bot used and returned for trigonometric functions.

    dec - Trig functions are DEGREES
    rad - Trig functions are RADIANS

    You can enter the commands "dec" or "rad" to switch modes.

    Note that switching modes has no affect on the current values on the display. To convert numbers between degrees and radians, use the todeg() and torad() functions.

    Display Modes

    The Display Mode defines how numerical data will be displayed it can be changed at any time by entering the following commands:

  • hex - Display in base 16
  • dec - Display in base 10
  • sci - Display in scientific notation
  • eng - Engineering Notation (See "Engineering Base" below)
  • After entering one of these commands, the preceding answer in the display is re-displayed in the new mode. For example:

    1000
    1000.
    hex
    0x3e8.
    eng
    1k.
    sci
    1e3.

    Display Modes

    Engineering Base

    This feature is my personal favorite - and I could be wrong - but know of no other calculators that do it!

    BKGcalc will take input, and display out (when in "eng" mode) using some of the standard numerical suffixes - i.e. "k" for 1000, "M" for 1000000, etc. This often makes things more ledgible, and easier to type.

    However - in the world of computers "k" isn't 1000 - it's 1024 and "M" isn't 1000000 - it's 1048576 (1024*1024), etc. So to make life a bit easier in doing computer-work "comp" mode treats these suffixes - in both display and data entry as 1024-based - not the usual 1000-based. So these symbols have meanings which depend on the mode you're in:

    Norm Comp
    n (nano) 10-9 2-30
    u (micro) 10-6 2-20
    m (milli) 10-3 2-10
    k (kilo) 1000 or 103 1024 or 210
    M (Mega) 1,000,000 or 106 1,048,576 or (1024×1024) or 220
    G (Giga) 1,000,000,000 or 109 (1024×1024×1024) or 230
    T (Terra) 1,000,000,000,000 or 1012 10244 or 240

    Here is a little example:

    1024*1024
    1048576.
    eng
    1.048576M.
    comp
    1M.

    Engineering Base and Display Modes

    More on Display Modes

    It is importiant to note that I have "decoupled" the display modes from the act of inputting a number as much as possible. This allows one to enter values one way, display them another, and change the display at will.

    For example - one can be in decimal mode - and enter data in hex, or vica-versa.

    0x1000
    4096.
    hex
    0x1000.
    1000
    0x3e8.
    dec
    1000.

    Input and Display Modes

    Not this only applies for "Display Mode" - and not "Engineering Base" or "Angle Modes" which are applicable for both entry and display.

    Variables

    New in Version 1.1

    Assigning and using variables Example:

    A=123
      123.
    B=200.
      200.
    A*B
      24600.
    

    Function Definitions

    New in Version 1.1

    Creating and Using User-Defined functions Example:

    define ctof(c)=((9*c)/5)+32
    ctof(75)
    167.
    ctof(0)
    32.
    ctof(100)
    212.
    

    Conversions

    Depressing the scroll-wheel, (as in all Blackberry apps) will bring up the Application's menu. Selecting the "Convert..." item under this will bring up the conversion dialog

    The conversion tables were built from numbers I found lying around the web. We all know how accurate and reliable "stuff I heard on the web" is. Multiply this by my ability to transpose the data correctly, and you'll understand how accurate these tables may be. I'd tell you the exact answer, but my calculator isn't that reliable.

    By default, the current answer from the display is used as the value to convert. (This may be changed in the dialog itself though). Select the type of measurement, and the from and to units. Then press the escape button to exit the conversion dialog, and the converted value will be placed in the display window.

    There are too many units to list here that BKGcalc is capable of converting from/to - it will convert units for these types of measurements:

    Acceleration Angle Area
    Distance/Length Mass/Weight Power
    Pressure Speed Temperature
    Time Interval Volume

    Functions

    ans

    Previous answer. e.g.:

    300-100
    200.
    ans-25
    175.

    ans

    log

    In version 1,1

    Compute Base-10 Log

    Example:

    	log(100) returns 2
    	

    ln

    In version 1,1

    Compute Natural Log

    Example:

    	ln(20) returns 2.995732273553991
    	

    cos(θ)

    Returns cosine of αtheta; in specified Angle Mode units

    Example:

    cos(45) returns 0.707...
    

    sin(θ)

    Returns sine of αtheta; in specified Angle Mode units

    Example:

    sin(30) returns 0.5
    

    tan(θ)

    Returns tangent of αtheta; in specified Angle Mode units

    Example:

    tan(30) returns 0.577..
    

    acos(χ)

    Returns arccosine of χ in specified Angle Mode units

    asin(χ)

    Returns arcsine of χ in specified Angle Mode units

    atan(χ)

    Returns arctangent of χ in specified Angle Mode units

    pi

    Returns value of π

    torad(θ)

    Converts θ degrees to radians - returns result

    todeg(θ)

    Converts θ radians to degrees - returns result

    sqrt(χ)

    Returns square root of χ

    BIG TIP: Holding down the ALT key, then pressing SHIFT sets your blackberry into 'num lock' mode

    Brad Goodman's Blackberry Software
    ©2006 Bradley K. Goodman