<< Chapter < Page Chapter >> Page >

Convert from feet to miles

Finally, Figure 5 shows the conversion factor (labeled f3 ) that can be used to convert a value expressed in feet to the same value expressed in miles.

That conversion factor is applied to the current distance value producing a final output consisting of the same distance expressed in miles instead of feet.That distance is now one mile (obviously I chose the numbers to make it come out that way).

That is the number that we were looking for.

Reverse the process

If a conversion factor X can be used to convert from A-units to B-units, the reciprocal of X can be used to convert from B-units back to A-units.

As you will see later, the conversion factor f4 shown in Figure 5 was computed as the product of the reciprocals of f1 , f2 , and f3 . The result is that the conversion factor labeled f4 can be used to convert a value expressed in miles to the same value expressed in paces (according to the pace-length for oneindividual).

That conversion factor was applied to the distance expressed in miles to produce the same distance expressed in paces. As you might have guessed, thisvalue of 2112 paces shown near the end of Figure 5 matches the value shown at the beginning of Figure 5 .

Analysis of the script

Now lets analyze the script code in Listing 1 that produced the text output shown in Figure 5 .

Listing 1 begins by declaring and initializing the variables d , d2 , and d3 , which are respectively,

  • The home to school distance in paces.
  • The two values that represent the relationship between paces and inches for one individual.

Various values are displayed as the script executes using calls to the document.write method. You should have no difficulty identify the code that displays the values, so I will skip over that code in thisdiscussion.

Compute, save, and apply the conversion factor f1

Then Listing 1 declares a variable named f1 and populates it with the value of a conversion factor that can be used to convert paces to inches. Thisconversion factor is computed from the known relationship between paces and inches mentioned earlier.

The conversion factor named f1 is applied to the distance in paces converting it to a value that represents the same distance in inches (63360 inches).

Analysis of the units

The comment that reads

//pace*inch/pace = inch

is an analysis that shows the units that will result from applying the conversion factor to the distance at this point. As you can see, the paceterms will cancel and the result will be in inches.

Compute, save, and apply the conversion factor f2

Following that, a conversion factor named f2 is computed that can be used convert a value expressed in inches to the same value expressed in feet. Thisconversion factor is based on the known fact that there are 12 inches in a foot.

The factor named f2 is applied to the distance that is now expressed in inches converting it to a new value that expresses the same distance in feet(5280 feet).

Analysis of the units

The comment that reads

//inch*feet/inch = feet

is an analysis that shows the units that will result from applying the conversion factor to the distance at this point. As you can see, the inchterms will cancel and the result will be in feet.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Accessible physics concepts for blind students. OpenStax CNX. Oct 02, 2015 Download for free at https://legacy.cnx.org/content/col11294/1.36
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?

Ask