Peter Alfeld, --- Department of Mathematics, --- College of Science --- University of Utah

Click on this image to download the software, see below how to get a panel with working controls.

The Slide Rule Explorer User's Guide

by Peter Alfeld , Department of Mathematics, University of Utah

The slide rule explorer (SRE) let's you explore more than 100,000 mathematical expressions that can be evaluated on a slide rule. You enter an expression and then click on Find to identify slide rule procedures that will evaluate that expression. One way to view the SRE is as a device to look up the expressions described on my slide rule page and in my article Many Formulas, Journal of the Oughtred Society, vol. 18, No. 2, 2009, pp. 18-21. However, it can also be used to explore more restricted scale combinations and to analyze the capabilities of existing or newly designed sliderules.

To get started

SRE runs on any computer that supports java. Download the file SRE.zip, unzip it, and put the files you'll get into a suitable directory. To start the software connect to that directory and type

 java rule 

in a suitable Command Window. (To get a command window in Windows 10, for example, right click on the start button and then click on "Command Prompt" in the resulting menu.)

A panel should appear that looks like the image on the top of this web page. We will refer to it as the Control Panel. Using any of the variables x, y, and z, enter a mathematical expression in the Expression Text Field in the second row of the control window and click on the green button labeled Find (or just click on Find if you wish to know how to compute x*y*z). In the Procedure Text Field in the third row of the Control Panel you will find a short description of how to compute your expression with a slide rule. Click on the button labeled Verbose to see a more detailed description appear in the Command Window.

With the SRE, you can enter expressions and see if and how you can evaluate these expressions with your slide rule. You can also see a list of expressions that can be so evaluated, and you can select the scales that are present on the slide and body of your slide rule. The remainder of this page describes how to use the controls in the Control Panel, what kind of sliderule procedures are available, how to select what scales you assume are present on your sliderule, and how to log the results of your investigation.

Available Procedures

Depending on whether an expression has 1, 2, or 3 variables, the SRE investigates one of four procedures. These are described here briefly, and more fully on my slide rule page.

1 Variable: Table Lookup

You align all scales, find the variable x on Scale 1, and look up the result on Scale 2.

Examples: If the two scales are the same, you won't be surprised to find x as the result. If Scale 1 is the C scale and Scale 2 the CF scale you find pi*x. Reversely, if Scale 1 is the CF scale and Scale 2 the C scale you will find x/pi.

2 Variables: Multiplication or Division

These are modeled after the ordinary multiplication and division procedures which are probably the most frequently employed slide rule procedures. However, instead of using the C and D scales exclusively, the SRE considers the use of other scales as well. For example, suppose you have a sliderule with an A (x^2) and D (x) scale on the body, and a K (x^3) scale on the slide, and you want to compute x^(1/2)*y^(1/3) or x^(1/2)/y^(1/3). Proceed as follows:

Example, Multiplication: Find x on the A scale, align the index of the K scale with x, move the hairline to y on the K scale, and read the result x^(1/2)*y^(1/3) under the hairline on the D scale.

Example, Division: Find x on the A scale, align with y on the K scale, move the hairline to the index of the K scale, and read the result x^(1/2)/y^(1/3) under the hairline on the D scale.

3 Variables

This procedure is obtained from either of the two 2 variable procedures by replacing the index of scale 2 with a number on another scale.

Example: To compute the triple product x*y*z you can save one alignment over the ordinary repeated multiplication procedure by proceeding as follows: Find x on the D scale, align x with y on the CI scale, move the hairline over z on the C scale, and read the expression x*y*z under the hairline on the D scale.

Available Scales

All scales are referenced to the C (on the slide) and D (on the body) scales. We refer to these two scales collectively as the CD scale, and to a value on either of those two scales as x. Those scales are logarithmic, the logarithm of x is proportional to the distance of x from the index of the scale. The SRE incorporates a total of 13 scales. They are briefly described here, for more information see Table 1 on the slide rule page.
  1. CD, x, the C and D scales, C on the slide, D on the body.
  2. CDI, 1/x, inverted scales, the CI scale on the slide, DI on the body.
  3. CDF, pi*x, the folded scales, CF on the slide, DF on the body.
  4. CDIF, 1/(x*pi), folded and inverted scales, CIF on the slide, DIF on on the body.
  5. AB, x^2, square scales, A on the body, B on the slide.
  6. W, sqrt(x), square root scale.
  7. ABI, 1/x^2, inverted square scales, AI on the body, BI on the slide.
  8. K, x^3, cube scale.
  9. KI, 1/x^3, inverted cube scale.
  10. LL, E, exp(x), exponential scale.
  11. L , log(x), logarithmic scale, the only scale to have a constant increment.
  12. S arcsin(x), measured in degrees.
  13. T arctan(x), measured in degrees.
  14. P, sqrt(1-x^2), the Pythagorean Scale.
  15. H, sqrt(1+x^2).
  16. SH, sinh(x) hyperbolic sine
  17. CH, cosh(x) hyperbolic cosine
  18. TH, tanh(x) hyperbolic tangent

Selecting Scale Combinations

The radio buttons in the last 2 rows of the control panel let you select the scales that are present on the body and the slide of a hypothetical slide rule. The SRE will search only for expressions that can be computed with those scales by the above procedures. By default all scales are assumed to be present on both slide and body. The total number of expressions, including duplications, that can be evaluated with those scales are 324 for 1 variable expressions, 11,664 for 2 variable expressions, and 104,976 for 3 variable expressions. (The SRE tries even more approaches by permuting the sequence of input variables for the 2 and 3 variable expressions.)

The scale menu in the first row of the control panel, next to the quit button, let's you preselect the following combinations:

Any of these selections can of course be modified by the radio buttons.

Listing Available Expressions

By clicking on one of the three List Buttons in the top row of the control panel all 1, 2, or 3 variable expressions that can be computed with the current scale combination are listed in the command window. You can also save them in a log file, see the next section.

Logging

By clicking on the Logs Button in the first row of the control panel you can cause the SRE to log its output in a file called SRE.n.log . The log is an exact copy of what is also printed in the command window. The number n is an integer that gets incremented every time you log a session. (The bigger it is the more you have worked, and the better you can feel.) When logging is active the Logs Button is green, otherwise it is red. By default logging is inactive. To close the log file properly make sure you exit the session with the Quit button rather than by some other means (such as turning off your computer.)

Finding Working Scale Combinations

Pressing on Find in the second row of the control panel will find and print the next working scale combination in the procedure text field and in the command window. Pressing Find again will find the next expression, and so on. Clicking on All will find all (remaining) scale combinations and list them in the command window. You can go back to the beginning of the list by clicking on start over. For each working scale combination there is a brief description in the Procedure Text Field. A more detailed descriptions of the last listed scale combination can be printed in the command window by clicking on the Verbose button.

The SRE proceeds through all available scale combinations and identifies those (if any) that work for the current expression. For the 2 variable expressions it then tries interchanging x and y. For example, x*y = y*x, and so you can first enter x and then y, or vice versa, using the same procedure. Thus, having all scales available on body and slide, the product x*y can be computed in 42 different ways. For the 3 variable expressions all 6 permutations of the input variables are investigated. Thus the product x*y*z can be evaluated in any of 96 distinct ways.

Entering Expressions

Expressions can be entered in the text fields in the second and third rows of the control panel, or by selecting scale combinations in the fourth, fifth, or sixth row. For example, if you wonder what you get when using the C and D scales exclusively select CD on each of the scale menus in the fourth, fifth, and sixth row of the control panel. (Select Multiply in the last menu of the 2 variable row.) The expressions x , x*y, and x/y*z will appear in the associated text fields. (You can also use these text fields to store expressions for later examination. In that case make sure not to touch the associated scale menus after entering your expressions.) To find more ways to evaluate any of those expressions click on the pertinent Transfer button, and then use the Find, All, and Verbose buttons, as desired.

When entering expressions in a text field, note that for your input to be effective it needs to be finalized by pressing the Enter key on the keyboard.

Expressions are of the ordinary algebraic kind. By clicking on the button labeled Syntax you get the following information in the command window.

algebraic expression syntax:

 x, y, z: can be used as variables, one or two may be missing
 +, -, *, /, **, ^: arithmetic operations, ** or ^ is exponentiation
 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, pi: the only pure numbers allowed (no multidigit numbers)
 properly matching parentheses, brackets, braces, (), [], {} 
 white space (blanks and tabs) allowed, and will be ignored
 available functions: 
	 sqrt, Sqrt, SQRT: square root 
	 exp: natural exponential
	 EXP or Exp: base 10 exponential
	 log or ln: natural logarithm
	 LOG or Log: base 10 logarithm
	 sin: sine function
	 asin or arcsin: inverse sin
	 tan: tangent function
	 arctan or atan: inverse tangent function
	 cos: cosine function
	 sinh: hyperbolic sine function
	 cosh: hyperbolic cosine function
	 tanh: hyperbolic tangent function
	 asinh: inverse hyperbolic sine function
	 acosh: inverse hyperbolic cosine function (x > 0)
	 atanh: inverse hyperbolic tangent function

 Examples:
 z*sqrt(1-y^2), sin(x*y), EXP(1+x^2), {x/[y/z]} 
 arctan((x^2-1)^(1/2)/(y^2-1)^(1/2)*(z^2-1)^(1/2))

Note that while you can use the usual notations to input the hyperbolic functions and their inverses, they are represented internally in terms of exponentials and logarithm and will be so displayed on output.

If an expression cannot be interpreted, for example because there is a syntax error, there will be an appropriate message in the command window. If the expression cannot be evaluated with the currently available scales the message

no working scale combos found
is printed in the text field in the third row of the control panel, and in the command window.

Documentation

The main documentation of the SRE is this web page. Clicking on Help prints this very brief help information in the command window:
You can find the documentation for this software online at
www.math.utah.edu/~pa/sliderules/SRE.html
The file SRE.html also should have come with this software.
You can view it locally with your preferred browser.
More information about the context of this software is at
www.math.utah.edu/~pa/sliderules
direct questions to Peter Alfeld at peteralfeld@gmail.com .
You may find it interesting to look at the files table1.data, table2.data, and table3.data which come with this software. They contain tables with available expressions in algebraic form, equivalent versions in reverse polish notation, their scale combinations, and information on how to test whether an expression entered by you is equivalent. Do note that modifying these files in any way may interfere with the proper operation of the SRE software!

How It Works

The tables of computable expressions were generated with the symbol processing language Maple . The SRE software converts those to reverse polish notation for faster evaluation. It does the same to any expression entered by you. To compare two expressions it evaluates each at two sets of random numbers and compares the results. If they agree within a certain tolerance the software deems the two expressions equivalent. Thus it does not matter (within the narrowly defined SRE syntax) how you enter your expression. For example, it will recognize that any procedure to compute x*y also works to compute ((x+y)^2-(x-y)^2)/4 if you choose to enter that latter expression.

On the other hand, you want to enter expressions without unduly limiting their domain. For example, the software will find 2 scale combos for the expression sqrt(1-x^2)/sqrt(1-y^2) but 4 for the seemingly equivalent expression sqrt((1-x^2)/(1-y^2)). The reason for this is that the first expression cannot be evaluated in real arithmetic if the absolute values of x and y are greater than 1, whereas the second expression can.

Caveats

The SRE is restricted to the four procedures described on this page. Of course many, in fact, infinitely many, others are possible. For example, a product of any number of factors can be computed in a straightforward fashion, but the SRE will tell you that it cannot find a scale combination to compute 2*x*y, and it cannot even recognize expressions with more than 3 variables (and those 3 would have to be x, y, and z).

It is possible that some valid scale combinations are not recognized by the software because some parts of an equivalent expression cannot be evaluated at the random numbers provided in the data files. It is also possible that the software will deem two expressions equivalent when mathematically they aren't. These cases should be rare.

It is well known to any slide rule enthusiast that there are many restrictions on the ranges of the numbers that can be entered and manipulated on the various scales of a slide rule. Scales may be split into two or more subscales and it is up to you to figure out which is relevant for a particular calculation. Scales may not contain information about the location of the decimal point. In any calculation, slide rule based or otherwise, you have to understand your problem before you compute an answer, you need to check your answers, and you need to be vigilant about the possibility of errors. So don't just identify a procedure, apply it, and assume you have the right answer!

More Info

You can write to me at peteralfeld@gmail.com.