## CrunchJr Computational Stories(Screen Shots)

This page presents a series of samples of CrunchJr uses.  Most are common computational problems which are solved with CrunchJr on an iPhone, iPad, or iPod/Touch.  Three of the samples are in Quick–mode (under the [MiniApps] tab), six are in PowerUser–mode (under the [Crunch] tab), and the first screen and the last two are just general information.  Quick–mode is very popular with users (simpler interface, less typing), but PowerUser–mode is much more powerful.  Most computational problems can be solved in either mode, but PowerUser–mode provides variables (with one or more values for each), can save the results for later use, and provides for User-defined functions (among other advantages).  The examples use a Storyboard format – with a short description and set of screen shots.  A simple navigation scheme allows you to view selected samples in any order.

Initial Screens – a peek at the first screens a user will see.
• Screen 1 – this is the screen one will see upon first startup.  Subsequent startups use the next screen.
• Screen 2 – this is a typical "returning user" startup screen.  Scroll down to see the remainder of the stats.
• Screen 3 – tapping the [Inputs] tab delivers this screen, which provides paths to a variety of input information.
• Screen 4 – tapping the [Info] tab delivers this screen, which leads to a wealth of support information.  Scroll down to see the other items.

MiniApp:  Body Mass Index (BMI) – a measure of weight for height and its implications.  Consider a 5' 10½" male weighing 170 pounds.
• Screen 1 – tap the [MiniApps] tab to arrive here (a list of all the MiniApp Domains).  Tap the Health & Fitness entry.
• Screen 2 – this is a list of all the Health & Fitness MiniApps.  Tap the Body Mass Index entry.
• Screen 3 – this is the top half of the Body Mass Index MiniApp page, displaying a brief description and the arguments.  Scroll down.
• Screen 4 – this page shows the arguments for Body Mass Index.  Leave the units button as is (Imperial means use pounds and inches).  Tap the "weight" box and enter 170.  Tap the "height" box and enter 70.5, then tap the [Submit] button.
• Screen 5 – this is the results page, displaying the input, the computed result, and a description of what the result means.  The result of 24.1 is in the Normal Range.  Tap the "BMI" button on the top left to get back to the previous page.
• Screen 6 – change the 170 to 215, and tap [Submit] again.
• Screen 7 – this result of 30.4 is in the Overweight Range.

Crunch:  Body Mass Index (BMI) – investigate different weights.  This computation zeroes in on the weight a 5' 10½" male needs to get down to in order to get into the Normal Range.
• Screen 1 – tap the [Crunch] tab to arrive here, and enter the expression bmi( wt, 70.5 ) into the [Submit] box.  Note that as you type, CrunchJr populates the bottom panel with the prototype for the BMI function.  In this expression, wt is a variable which can accept 1 or more values.  Tap the [Submit] button.
• Screen 2 – Enter 175, 180, 185, 190, 195, 200, 205 into the wt box (some values have scrolled off the left in the screen shot below).  Tap [Submit].
• Screen 3 – This screen shows the BMI values for the seven different values for weight, suggesting that about 186 pounds would put this man back in the Normal Range.

Crunch:  A simple expression with 1 variable – show how to use a simple expression.
• Screen 1 – tap the [Crunch] tab to arrive here, and enter the expression omega*cos(omega^3*halfpi) into the [Submit] box.  Note that as you type, CrunchJr populates the bottom panel with some useful information: one Constant (HALFPI); one Variable (omega), used twice; one function (Cos), along with the prototype for the Cos function.  Tap the [Submit] button.
• Screen 2 – Enter 4 values: 5.86, pi, 11.2, 71 into the omega box (note that the constant PI is a valid number).  Tap [Submit].
• Screen 3 – This screen shows the four result values.  Also, the Show OpCount/Time option has been turned on, and it shows that there were 320 basic operations in the computation itself, and the interpreted computation took about 54 microseconds.  Note that the basic operations are (+, -, *, /, shift, compare), computation times vary widely (even for the same expression), and there are many more operations associated with rendering the output into human readable form (these operations are not part of OpCount) than in the computation itself.
• Screen 4 – This screen shows the same result as Screen 3, but this time the Show Stats option has been turned on (the OpCount data is still there – below the Stats).

Crunch:  A simple equation with 2 variables – show how to use a simple equation.  An equation takes the form  var  =  expression,  where the expression can use any variables except var.  After the evaluations, all the values for var are kept in the Store, where they are availble for later use.
• Screen 1 – tap the [Crunch] tab to arrive here, and enter the expression alpha = sqrt2*(beta*sin(x/4)) into the [Submit] box.  Note that as you type, CrunchJr populates the bottom panel with some useful information: one Constant (SQRT2); three Variables (alpha, beta, x); one function (Sin), along with the prototype for the Sin function.  Tap the [Submit] button.
• Screen 2 – Enter three values: 1, 3.11, .7311 into the beta box, and five values: 2, 7, 0.45, -2, 11 into the x box.  Tap [Submit].
• Screen 3 – This screen shows the 15 result values (scroll down to see the last value).  The 15 values for the result variable (alpha) are retained in the Store for later use.  When alpha is used in an expression, those 15 values are automatically available (the user can modify or ignore them).

MiniApp:  Solve 3 equations in 3 unknowns – using Quick–mode we can quickly solve a set of equations (PowerUser–mode could be just as easily used).  Consider these three equations:
• 2x + 4y + 5.55z  =   –3
• 5x – z  =   8
• 0.99x + 0.6y + z  =   2.3
• Screen 1 – tap the [MiniApps] tab, then tap the Basic Math entry, and scroll down and tap Solver to arrive here.  Note that tapping the [+Fav] button on the upper right allows quicker future navigation to this screen.
• Screen 2 – Scroll down a little, then tap 3 for the value of N, and enter the terms of the 3 equations in the vals box.  The terms must be separated by commas.  Then tap [Submit].
• Screen 3 – This screen shows the input values and the results.

Crunch:  Mortgage payoff strategy – consider a partly paid off mortgage with an outstanding balance or \$195,600, with a 5.2% loan and a monthly mortgage payment of \$1,106.  What impact would paying a little more with each monthly payment have on total out-of-pocket cost for the house?  Look at 4 values for the extra payment (\$50, 100, 150, 200).
• Screen 1 – tap the [Crunch] tab to arrive here, and enter the expression payoff2( 1106, 5.2, 195600, x) into the [Submit] box.  Note that as you type, CrunchJr populates the bottom panel with the prototype and description of the Payoff2 function as a reminder of the arguments.  Tap the [Submit] button.
• Screen 2 – Enter 4 values: 50, 100, 150, 200 into the x box (x represents the extra amount added to each monthly payment).  Tap [Submit].
• Screen 3 – This screen shows the results.  By paying \$200 extra with each monthly payment, the loan is paid off almost 8 years early, with a total out-of-pocket savings of about \$55K.
• Screen 4 – This screen shows the same result as Screen 3, but this time showing the bottom part of the result.

MiniApp:  Complex Division – arithmetic with complex numbers.
• Screen 1 – tap the [MiniApps] tab, then scroll down and tap the Complex Numbers entry to arrive here (a list of all the Complex Number MiniApps).  Tap the Complex Division entry.
• Screen 2 – this is the data entry section for the Complex Division MiniApp, displaying a brief description and the arguments.  To find the value of (7 + 11i)/(1 + 3i), enter 7, 11 in the x box, and 1, 3 in the y box and tap [Submit].
• Screen 3 – this page shows the arguments for this case, the result (4 - i), and some explanatory text.
• Screen 4 – to verify, go back to Screen 1 and tap the Complex Mulitply entry.  Then enter 7, 11 in the x box, and 4, -1 in the y box, and tap [Submit].
• Screen 5 – Here we see the expected result (7 + 11i)

Crunch:  approximate numerical integration – integrate the expression: x² sin(x)  from x = 1.7 to 1.9
• Screen 1 – tap the [Crunch] tab to get here.  Enter integrate( 1.7, 1.9, x^2*sin(x)) into the box.  Tap the [Submit] button.
• Screen 2 – here we see the approximate result of the integration.  If the computation had not converged, the convergence information would have been displayed (and the result would have been suspect).
• Screen 3 – this page shows the same result as Screen 2, except that the Quadrature function was used.  Both these functions use the same code to approximate the result, but Quadrature always lists the convergence information.

Crunch:  Error detection CrunchJr catches errors in four places: during typing, during semantic analysis, during variable value determination, and at run-time (when the expression is being evaluated).  This section gives several examples of errors and their associated messages.  Note that the error screens are bright yellow (although this color is user-settable).
• Screen 1 – detects a simple typo – sqrr is not a valid function name.  This error is detected during typing.
• Screens 2,3 – an error is detected for this simple expression during semantic analysis – sqrt is allowed only one argument.

• Screens 4,5,6 – a simple expression is entered, data is presented to it, and then two errors are caught at run-time.  The other cases are tabulated.

• Screens 7,8 – an incorrect number of arguments to the MatrixInv function is detected during semantic analysis.
• Screens 9,10 – an unrecognizable sequence is detected during semantic analysis.

• Screens 11,12 – mismatched parentheses are detected during semantic analysis.
• Screen 13 – an illegal sequence is detected during typing

Search – samples of the CrunchJr Search capability, which employs a simple, single-keyword search.  Results are tabulated on the fly beginning with the third character.  There are four collections of information which can be searched: Functions, Constants, Screens, and (All 3).
• Screen 1 – tap the [Inputs] tab, then tap the Functions entry.
• Screen 2 – this is the list of all the Functions – if the Search bar isn't showing, just scroll up.  Enter a string into the Search bar.  Results show up starting at the third character of the search string.
• Screen 3-6 – these four screens show the results of 4 different searches.

• Screen 7 – tap the [Inputs] tab, then tap the Constants entry.
• Screen 8 – this is the list of all the Constants – if the Search bar isn't showing, just scroll up.  Enter the string "dist" into the Search bar.  Results show up starting at the third character of the search string.
• Screen 9 – this is the list of all the Constants which match the keyword "dist."

• Screen 10 – tap the [Info] tab to get here.  This is the main Info screen. then tap the All Screens entry.
• Screen 11 – this is the list of all the Screens.  Most of them have multiple access pathways.  Enter "area" into the Search bar.
• Screen 12 – this is the list of all the screens which match the keyword "area."

• Screen 13 – tap the [Search] tab to get here.  This is the main Search screen.  Enter a string into the search bar – this will initiate a search across all the Functions, Constants, and Screens.
• Screen 14 – this is the list of all the hits for the string "mass" (actually there are 19 hits).  The blue entries are Functions, Green are Constants, and Red are Screens.
• Screen 15 – this is the list of all the hits which match the keyword "pow" (6 Functions, 2 Screens).