Q  (v9.3 – Nov 19, 2016)

© 2005-2016 Mark Furtney.  All rights reserved.

ComputeSoup – Web Computational Engine

(Equation/Expression Evaluation)


 
                       
 

              Enter expression in this box
Expr  


  CrunchJr  


        CrunchJr is a powerful computational engine which is a superset of the capabilities found on this web site.   It is available as a 99¢ iPhone/iPad app.  It has 250+ MiniApps, 300+ Functions, and a wide variety of other handy features.   For an overview, visit www.crunchjr.com.


ComputeSoup – Input Shortcuts

Input values may be integers, floating point values, or ComputeSoup-recognized constants (like pi or sqrt2).  Input values are separated by one or more commas, blanks, or newlines.  Further, there are three special strings that can be used with input values:  Loop,  Interp, and Last



ComputeSoup – Overview

This web site allows users to evaluate expressions (including those which have variables – each with one or more values), and display the results in an easy-to-read table.  Many standard mathematical constants and functions are available for use in the expressions, as well as a collection of special purpose functions for a variety of computational chores (for example, calculating race pace, refinance and mortgage payoff strategies, performing integrations, calculating the number of calories burned by various workouts).  The button (above left) allows you to get more details about these and other capabilities, and the other buttons above (e.g., , , , ) lead to information which may be useful in building computations.  The button presents more detail about how to use this site effectively, the button brings up this page, and the button provides a mechanism for sending comments, questions and/or requests to us.

There are several advanced features, including storing results for later use, building user-defined functions, input shortcuts, and integration.  Click for details.

The major capability is to evaluate expressions and equations (including those that have variables) and print the results out in a table for easy review.  Below are five samples:
1)    A simple equation with a constant, two functions, and two variables
2)    Calculate race times and race paces
3)    Calculate calories consumed during a bike ride and other actvities
4)    Investigate mortgage payoff strategies (various extra payments each month)
5)    Calculate the implications of refinancing a mortgage


Sample 1)     tr = (pi-2.375)*(sqrt(x)*cos(omega-x))

Calculate values for tr for three values of x and three values of omega.  This is a two-step operation: first enter the equation into the [Expr] box (as in the sample below) and click .

Expr  

and second, enter value(s) for the variables (as in the sample below) and click .

x  
omega  








This will yield the results shown below:

tr = (PI-2.375)*(Sqrt(x)*Cos(omega-x));

tr x omega
     ------     ---     ---------  
Max   1)     1.6864589   5     5.18 
2)    -0.9853364   5     9.1 
3)     1.534163   5     17.104 
4)    -0.500223   7     5.18 
5)    -1.0239357   7     9.1 
Min   6)    -1.5780752   7     17.104 
Mdn   7)     0.2603652   10     5.18 
8)     1.5068937   10     9.1 
9)     1.6523817   10     17.104 

This sample illustrates the use of variables (x and omega), uses an equation (an equation is a result variable (tr), followed by "=" and an expression).  The nine result values of tr are automatically saved in the Store.  If you use tr in a subsequent computation during this session, those nine values will automatically be loaded (although you can edit or override them).  One constant (PI) and two functions – Sqrt() and Cos() – are also used.  The maximum, minimum and median value of the results are flagged.  Further, note that whitespace is ignored in the [Expr] box, but that whitespace is important for entering variable values.  Values are separated by any combination of one or more blanks and commas.


Sample 2)     Using Race Functions

How long will it take to run a marathon at a steady pace of 7:15 per mile?

The Racetime() function has three arguments (distance, minutes, and seconds).  It shows the time to cover the distance at the input pace.  Enter the information into the [Expr] box and click .

Expr  

which yields

Racetime(MARATHON, 7, 15);

The Marathon:  26.21875 mi at 7:15/mi (8.28 mph) =>  3:10:05



In this sample, marathon is a constant.  The Racepace() function performs the reverse operation – it takes 4 arguments (distance, hours, minutes, seconds) and reports overall pace for a given distance and time.  In this sample, the variable xmin is used to check out the paces for various overall times.

Expr  

Enter value(s) for xmin and click .
xmin  






which yields

Dist (mi) TimePace
The Marathon:    26.21875   3:00:00   6:52/mi   (8.74 mph)
The Marathon:    26.21875   3:10:00   7:15/mi   (8.28 mph)
The Marathon:    26.21875   3:20:00   7:38/mi   (7.87 mph)
The Marathon:    26.21875   3:30:00   8:01/mi   (7.49 mph)
The Marathon:    26.21875   3:40:00   8:23/mi   (7.15 mph)
The Marathon:    26.21875   3:50:00   8:46/mi   (6.84 mph)


Sample 3)    Calories burned

How many calories do you burn in a 50 minute, 13½ mile bike ride if you weigh 165 pounds?

You can use the Calories() function.  Enter calories() in the [Expr] box and click to see the arguments.  This yields the following table, which shows that the Calories() function can be used with 40 different activities (for this sample, we choose cycling):

Function Args Results Prototype/Description Expr Use?
 Calories  5 text   Calories( activity, weight, dist, min, sec ):  Approximate calories consumed by various activities.  Arguments as in the table below.  For example: "Calories( running, 165, 3.25, 25, 20 )" yields "408 calories -- Running (165 lbs, 3.25mi in 25:20 =>  7:48/mi = 7.70 mph)".  See also Fitness(), HeartRate(), Karvonen(), Points(), Bmi()
activity   weight     dist    min    sec    |   Others
Walking lbs miles min sec | Aerobicdance, Aerobicshi, Aerobicslo, Basketball,
Running lbs miles min sec | Handball, Hockey, Iceskating, Judo, Karate, Lacrosse,
Cycling lbs miles min sec | Pingpong, Racketball, Rollerblading, Rollerskating,
Swimmingmylbs yards min sec | Rowing, Skiingcc, Skiingdh, Skiingwater,
Swimmingfy lbs yards min sec | Snowshoeing, Snowshoveling, Soccer, Squash,
Swimmingmm lbs meters min sec | Taichi, Tennisd, Tenniss, Volleyball,
Swimmingfmlbs meters min sec | Wateraerobics
Skiprope lbs rpm min sec | Swimming__; my=(male,yards), fy=(female,yards);
Golfcarry lbs # holes min sec |       mm=(male,meters), fm=(female,meters);
Golfwalk lbs # holes min sec | Aerobics__;  lo=low-impact,  hi=high-impact
Others lbs 0 min sec | Skiing__;  cc=cross-country,  dh=downhill
Stepcount lbs # steps 0 0 | Tennis_;  d=doubles,  s=singles
 
No


Enter the argument values into the [Expr] box (as below) and click .

Expr  

which yields

Calories( CYCLING, 165, 13.5, 50, 0 );

517 calories -- Cycling (165 lbs,  13.5mi in 50:00  =>  3:42/mi = 16.20 mph)

In this sample, cycling is a constant.  Check the Prototype/Description table above for other activities which are supported by Calories(), for example, running, swimming, tennis, walking, aerobics, ....

Here are two more Calories() samples (running and walking).

Expr  

which yields

Calories( RUNNING, 175, 3, 22, 40 );

402 calories -- Running (175 lbs, 3mi in 22:40 => 7:33/mi = 7.94 mph)



Expr  

which yields

Calories( WALKING, 140, 3.8, 63, 0 );

254 calories -- Walking (140 lbs, 3.8mi in 1:03:00 => 16:35/mi = 3.62 mph)



Sample 4)     Paying off a loan early

Consider a mortgage at 6.55%, with payment of $1,331.76 per month, and an outstanding balance of $204,236.70 – what will be the impact of paying an extra $200 each month (assuming no prepayment penalties)?  What about other amounts?

You can use the Payoff2() function.  Enter payoff2() in the [Expr] box and click to see the arguments.  This yields

Function Args Results Prototype/Description Expr Use?
 Payoff2  4 table   Payoff2( payment, rate, balance, extra ):  Show impact of extra amount submitted with each future mortgage payment when the loan is partly paid off:
    payment  =  Monthly payment (principal + interest only: no escrow)
    rate  =  Annual interest rate (percent - e.g., 5.85)
    balance  =  Current balance (principal)
    extra  =  Extra amount with each payment
Same as PayoffExtra2().  See also Refinance(), Mortgage(), and the other Payoff*() functions. 
No

Enter the information into the [Expr] box (as below) and click .

Expr  

which yields


Balance = $204,237 at 6.55% with monthly payments of $1,331.76
Total responsibility = 334 payments (333 * $1,331.76 + $447.13)
= $443,923  ($239,687 = 54.0% is interest)

An extra $200/month saves $77,785 (17.5%),  pays off loan 94 months early

    Standard  $200 extra 
    ---------------  -------------- 
 Balance  $204,237  $204,237 
 Payment  $1,331.76  $1,531.76 
 Last payment  $447.13  $47.65 
 Months   334   240 
 Interest  $239,687  $161,902 
 % Interest  54.0%  44.2% 
    ---------------  -------------- 
 Total  $443,923  $366,138 
    ---------------  -------------- 
 Savings  —     $77,785 

This computation is based only on principal and
interest, and assumes no prepayment penalty.
Escrow (taxes + insurance) is not part of the computation.

This shows a set of results for paying an extra $200.00 with each monthy payment.  The impacts are an overall savings of $77,785 (17.5%) and a reduction of almost eight years of payments.

To investigate the impact of other extra amounts per month, use various values for the extra variable.  Enter:

Expr  

Note the variable add – picking a set of values for add allows us to do a simple parameter study.  That is, we can easily see the results of various extra payment amounts.  Now click , then enter the additional amount(s) to pay for each month (values for add) and click to see the impact

              Enter value(s) for add
add





which yields


Balance = $204,237 at 6.55% with monthly payments of $1,331.76
Total responsibility = 334 payments (333 * $1,331.76 + $447.13)
= $443,923  ($239,687 = 54.0% is interest)

MonthlyMonthly/-------------- Saves ------------\FinalTotalTotal
ExtraPayment$%Months PaymentInterestPayments
-----------  -------------  -----------------------------------------  ------------  ------------------------   --------------
 0  $1,331.76  —         $447.13  $239,687  54.0%  $443,923 
 $50  $1,381.76  $26,619  6.0%   31  $12.80  $213,068  51.1%  $417,304 
 $100  $1,431.76  $47,323  10.7%   56  $3.15  $192,364  48.5%  $396,601 
 $168.24  $1,500  $69,318  15.6%   84  $1,105.15  $170,368  45.5%  $374,605 
 $200  $1,531.76  $77,785  17.5%   94  $47.65  $161,902  44.2%  $366,138 
 $250  $1,581.76  $89,408  20.1%  109  $201.20  $150,279  42.4%  $354,515 
 $300  $1,631.76  $99,364  22.4%  122  $257.47  $140,322  40.7%  $344,559 
 $400  $1,731.76  $115,583  26.0%  144  $1,037.17  $124,103  37.8%  $328,340 
 $500  $1,831.76  $128,280  28.9%  161  $580.17  $111,406  35.3%  $315,643 

This computation is based only on principal and
interest, and assumes no prepayment penalty.
Escrow (taxes + insurance) is not part of the computation.


Note that the Payoff() function is similar to Payoff2(), except that Payoff() works with a loan starting at the beginning instead of during the payoff lifetime.  To see other financial functions, go to the top of this page and click   ,   or click   .  The financial function Refinance() is described below.


Sample 5)     Refinancing a loan

Consider a mortgage at 7.375%, with payment of $1,885.66 per month and outstanding balance of $210,420 – what will be the implications of refinancing at 5.125% with a $2,750 refinance charge and taking out an additional $5,000 equity loan?

You can use the Refinance() function.  Enter refinance() in the [Expr] box and click to see the arguments.  This yields

Function Args Results Prototype/Description Expr Use?
 Refinance  7 table   Refinance( currBalance, currPayment, currRate, newRate, loanCharge, loanLoan, newDuration ):  Impact (total cost, breakeven, % interest, et cetera) of refinancing a loan:
    currBalance – Current loan balance (principal)
    currPayment – Current loan payment (principal and interest components only)
    currRate – Current loan annual interest rate (percent - e.g., 7.125)
    newRate – New loan annual interest rate (percent - e.g., 5.75)
    loanCharge – Addition to principal (loan charge - e.g., closing costs, points)
    loanLoan – Addition to principal ("equity" payout - may be 0)
    newDuration – New loan duration (years)
Notes: (1) Do not include escrow payments (typically taxes and insurance) with currPayment,  (2) See also Mortgage() and the Payoff*() functions 
No

The Refinance() function has 7 arguments.  Enter the information into the [Expr] box (as below) and click .

Expr  

which yields

Refinance(210420, 1885.66, 7.375, 5.125, 2750, 5000, 15);


Balance = $210,420.00 at 7.375% with monthly payments of $1,885.66
Current responsibility = 189 payments (188 * $1,885.66 + $1,809.77)
= $356,313.85  ($145,893.85 = 40.9% is interest)

    Current
Mortgage 
 New Mortgage
(w/out Equity) 
 New Mortgage
(w/ Equity) 
 New Mortgage
  (Old Payment) 
    ------------  ---------------  ---------------  ---------------- 
 Interest Rate  7.375%  5.125%  5.125%  5.125% 
 Equity "Loan"     0.00  $5,000.00  $5,000.00 
 Balance  $210,420.00  $213,170.00  $218,170.00  $218,170.00 
 Payment  $1,885.66  $1,699.65  $1,739.51  $1,885.66 
 Last Payment  $1,809.77  $1,699.65  $1,739.51  $1,710.84 
 Months  189  180  180  160 
 Breakeven     15  37  22 
 Interest  $145,893.85  $92,767.00  $94,941.80  $83,360.78 
 % Interest  40.9  30.3  30.8  28.1 
    ------------  ---------------  ---------------  ---------------- 
 Total To Pay  $356,313.85  $305,937.00  $308,111.80  $296,530.78 
    ------------  ---------------  ---------------  ---------------- 
 Savings —        $50,376.85  $48,202.05  $59,783.06 

This computation is based only on principal and
interest, and assumes no prepayment penalty.
Escrow (taxes + insurance) is not part of the computation.




Click Advanced Features to review some of the more advanced ways to use ComputeSoup (also available via ).
---//---