#
#  @(#).calctoolrc 1.4 89/12/13
#
#  This is a sample .calctoolrc file. You should use this as a basis for
#  creating your own .calctoolrc files.
#
#  Process the .calctoolrc file. There are currently four types of
#  records to look for:
#
#  1) Those starting with a hash in the first column are comments.
#
#  2) Lines starting with 'c' or 'C' in the first column are
#     definitions for constants. The cC is followed by a digit in
#     the range 0-9, then a space. This is followed by a number
#     in fixed or scientific notation. Following this is an optional
#     comment, which if found, will be used in the popup menu for
#     the constants. If the comment is present, there must be at
#     least one space between this and the preceding number.
#
#  3) Those starting with a 'f' or a 'F' in the first column are
#     definitions for functions. The fF is followed by a digit in
#     the range 0-9, then a space. This is followed by a function
#     definition. Following this is an optional comment, which if
#     found, will be used in the popup menu for the functions.
#     If the comment is present, there must be at least one space
#     between this and the preceding function definition.
#
#  4) Lines starting with a 'r' or a 'R' in the first column are
#     definitions for the initial contents of the calculators
#     memory registers. The rR is followed by a digit in the
#     range 0-9, then a space. This is followed by a number in
#     fixed or scientific notation. The rest of the line is ignored.
#
#  All other lines are ignored.
#
#  Two other things to note. There should be no embedded spaces in
#  the function definitions, and whenever a backslash is found, that
#  and the following character signify a control character, for
#  example \g would be ascii 7.
#
#  CONSTANTS
#
#  This is a set of nine physical constants which could be used instead
#  of those provided by default. If you don't wish to use these, then
#  you should define your own, or comment these out.
#

c0 299792458          Speed of light in a vacuum (c).

c1 6.626176E-34       Planck's constant (h).

c2 6.672E-11          Gravitational constant (G).

c3 1.6021892E-19      Elementary charge (e).

c4 9.109534E-31       Electron rest mass (me).

c5 1.6605655E-27      Atomic mass unit (u).

c6 6.022045E23        Avogadro constant (Na).

c7 1.380662E-23       Boltzmann constant (k).

c8 0.02241383         Molar volume of ideal gas at s. t. p. (Vm).

#  FUNCTIONS.
#
#  This is a sample set of functions which are assigned to the FUN key.
#
#  On a suggestion from Charles Tierney, these functions are taken from
#  the power calculation section of the March 1989 edition of the Sun
#  Configuration Guide.
#
#  f0 - Calculate AC Watts (Formula A).
#
#                            1
#      P(true) = P(DC) x  -------
#                         PS(Eff)
#
#      where P(DC) = total DC power in watts [user-calculated] - register 0.
#
#      result placed in register 1.

f0 r0x1.43=s1          Calculate AC Watts (Formula A).

#  f1 - Calculate Thermal Dissipation (Formula B).
#
#                                 BTU
#     BTU(nom) = P(true) x 3.412 -----
#                                 watt
#
#     where P(true) = true AC power in watts from above - register 1.
#
#     result placed in register 2.

f1 r1x3.412=s2         Calculate Thermal Dissipation (Formula B).

#  f2 - Calculate Volt - Amps (Formula C).
#
#                     1
#    VA = P(true) x ----
#                    PF
#
#    where P(true) is from the formula above  - register 1.
#
#    and PF is the Power Factor               - register 3.
#
#    Sun-3/60/140/160/180 and Sun-4/110  =  0.65
#    Sun-3/260/280 and Sun-4/260/280     =  0.715
#    Sun-3/150 and Sun-4/150             =  0.9  (at full load).
#
#    result placed in register 4.

f2 1/r3xr1=s4          Calculate Volt - Amps (Formula C).

#
#   REGISTERS.
#
#   This is a sample set of initial register values. You probably
#   don't want to use these, so you should define your own or comment
#   these out.

r0 0.4971              Log10 of pi.

r1 0.4343              Log10 of e.

r3 57.29578            Degrees in  radian.
