# bodian/khan-exercises forked from Khan/khan-exercises

Merge and squash pull request #11316 from eltacodeldiablo/sci-nota-mu…

…lti-divide

Closes #11316

commit 7090ef7
Author: eltacodeldiablo <smiley.we@gmail.com>
Date:   Sun Jan 15 18:28:31 2012 -0500

commit ffc9e73
Author: eltacodeldiablo <smiley.we@gmail.com>
Date:   Sun Jan 15 18:09:43 2012 -0500

changed multiply/divide hints
1 parent 0b0611d commit aa972a64fae98e546f5074c90bf3502d57627b03 hzoo committed with beneater Mar 10, 2012
Showing with 97 additions and 0 deletions.
1. +79 −0 exercises/multiplying_and_dividing_scientific_notation.html
2. +18 −0 utils/math-format.js
 @@ -0,0 +1,79 @@ + + + + + Multiplying and Dividing Scientific Notation + + + +
+
+ randRange( 1, 9 ) * Math.pow( 10, randRange( -5, 5 ) ) + randRange( 1, 99 ) * Math.pow( 10, randRange( -5, 5 ) ) + DENOMINATOR * QUOTIENT +
+ +
+
+

+ Express this quotient in scientific notation: + \Large{\frac{scientific( 3, NUMERATOR )} + {scientific( 1, DENOMINATOR )}}

+ +
+ scientificMantissa( 2, QUOTIENT ) + \times 10 + scientificExponent( QUOTIENT ) +
+ +
+

Start by collecting like terms together.

+

\Large{\frac{scientificMantissa( 3, NUMERATOR )} + {scientificMantissa( 1, DENOMINATOR )}} + \times\Large{\frac{10^{scientificExponent( NUMERATOR )}} + {10^{scientificExponent( DENOMINATOR )}}}

+

Then divide each term seperately. When dividing exponents with the same base, subtract their powers.

+

( scientificMantissa( 3, NUMERATOR ) / scientificMantissa( 1, DENOMINATOR ) ).toFixed( 2 ) + \times 10^{scientificExponent( NUMERATOR )\,-\,scientificExponent( DENOMINATOR )}

+

( scientificMantissa( 3, NUMERATOR ) / scientificMantissa( 1, DENOMINATOR ) ).toFixed( 2 ) + \times 10^{scientificExponent( NUMERATOR ) - scientificExponent( DENOMINATOR )}

+
+

To write the answer correctly in scientific notation, the first number needs to be between 1 and 10. In this case, we need to multiply current mantissa by 10.

+

We split up the power of ten from the second term.

+

( ( scientificMantissa( 3, NUMERATOR ) / scientificMantissa( 1, DENOMINATOR ) ).toFixed( 2 ) + \times 10^{ 1 } ) \times 10^{scientificExponent( NUMERATOR ) - scientificExponent( DENOMINATOR ) - 1}

+

scientific( 2, QUOTIENT )

+
+
+
+

+ Express this product in scientific notation: + (scientific( 2, QUOTIENT ))\times (scientific( 1, DENOMINATOR ))

+ +
+ scientificMantissa( 3, NUMERATOR ) + \times 10 + scientificExponent( NUMERATOR ) +
+ +
+

Start by collecting like terms together.

+

(scientificMantissa( 2, QUOTIENT )\times scientificMantissa( 1, DENOMINATOR )) + \times (10^{scientificExponent( QUOTIENT )}\times 10^{scientificExponent( DENOMINATOR )})

+

When multiplying exponents with the same base, add the powers together.

+

(scientificMantissa( 2, QUOTIENT ) * scientificMantissa( 1, DENOMINATOR ) ).toFixed( 1 ) + \times 10^{scientificExponent( QUOTIENT )\,+\,scientificExponent( DENOMINATOR )}

+

(scientificMantissa( 2, QUOTIENT ) * scientificMantissa( 1, DENOMINATOR ) ).toFixed( 1 ) + \times 10^{scientificExponent( QUOTIENT ) + scientificExponent( DENOMINATOR )}

+
+

To write the answer correctly in scientific notation, the first number needs to be between 1 and 10. In this case, we need to multiply current mantissa by 10.

+

We split up the power of ten from the second term.

+

( (scientificMantissa( 2, QUOTIENT ) * scientificMantissa( 1, DENOMINATOR ) ).toFixed( 1 ) + \times 10^{ 1 } ) \times 10^{scientificExponent( QUOTIENT ) + scientificExponent( DENOMINATOR ) - 1}

+

scientific( 3, NUMERATOR )

+
+
+
+
+ +
 @@ -511,5 +511,23 @@ jQuery.extend(KhanUtil, { } } return ret; + }, + + scientificExponent: function( num ) { + return Math.floor(Math.log(Math.abs(num)) / Math.log(10)) + }, + + scientificMantissa: function( precision, num ) { + var exponent = KhanUtil.scientificExponent( num ); + var factor = Math.pow(10, exponent) + precision -= 1 // To account for the 1s digit + var mantissa = KhanUtil.roundTo(precision, num / factor).toFixed(precision) + return mantissa + }, + + scientific: function( precision, num ) { + var exponent = KhanUtil.scientificExponent( num ) + var mantissa = KhanUtil.scientificMantissa( precision, num ) + return "" + mantissa + "\\times 10^{"+exponent+"}" } });