# Khan/khan-exercises

pulled out helpers into math-table.js and cleaned up adding and subtr…

`…acting negative numbers`
 @@ -13,32 +13,22 @@
-
- "+" -
-

A OP B

+

A + B

A+B
-

+(B) = -B*-1

-

A OP B = A+B

+

+(B) = -B*-1

+

A + B = A+B

-
-
- "-" -
-

A OP B

+
+

A - B

A-B
-

-(B) = +B*-1

-

A OP B = A-B

+

-(B) = +B*-1

+

A - B = A-B

-
-

-

-
 @@ -1,46 +1,9 @@ - + Adding Decimals - +
@@ -53,6 +16,7 @@ digits( round( A * pow( 10, MAX_SHIFT ))) digits( round( B * pow( 10, MAX_SHIFT ))) createLongAdditionTable( A_ARRAY, B_ARRAY) + (round( A * pow( 10, MAX_SHIFT ))) + (round( B * pow( 10, MAX_SHIFT ))) / pow( 10, MAX_SHIFT)
 @@ -1,46 +1,9 @@ - + Addition 3 - +
 @@ -1,46 +1,8 @@ - + Addition 4 -
 @@ -1,5 +1,5 @@ - + Division 1.5 @@ -15,27 +15,6 @@ } return result; } - function createLongDivisionTable(n,div){ - var temp = KhanUtil.digits(n); - var divisions= []; - var subtrahends = []; - var minuends = []; - for( var i=temp.length-1;i>=0;i--){ - var curDividend = 0; - for( var y=i;y=div || divisions.length > 0){ - var division=Math.floor(curDividend/div); - divisions.push(division); - var subtrahend = division*div; - subtrahends.push(subtrahend); - temp= KhanUtil.digits(parseInt(temp.reverse().join(""))-subtrahend*Math.pow(10,i)); - minuends.push(curDividend); - } - } - return {divisions:divisions, subtrahends:subtrahends, minuends:minuends}; - }
 @@ -1,31 +1,9 @@ - + Division 2 - +
 @@ -1,31 +1,8 @@ - + Division 3 -
 @@ -1,32 +1,8 @@ - + Division 4 - -
 @@ -1,41 +1,9 @@ - + Multiplication 2 - +