title: multiply large numbers in fastest way of multiplication
body: <pre><code>// the function returns the multiply of p1 and p2 big
  function mul_b(p1, p2) {
      var eql = ""; // fine value 
      var r_eql = ""; // reversed value retured
      var carry = 0;
      var length_p1 = p1.length - 1;
      console.log( "length first number " + length_p1);
      var length_p2 = p2.length - 1;
      console.log( "length secnd number " + length_p2);       
      if (length_p1 != length_p2){// eql two number by padding zeros
          return "Please make both sides equal!";
      }
      console.log(length_p1 + "=" + length_p2);       
      var A1,A2;
      var A3 = 0;
      for(var j = length_p1; j&gt;=0; j--){
          var k = j;
          A3 = 0;
          for( var i = length_p1 ; i &gt;= j ; i-- ){            
              A1 = parseInt(p1.charAt(k));
              A2 = parseInt(p2.charAt(i));
              k+=1;
              console.log("("+A1+","+A2+")");
              A3 = (A1 * A2) + A3;    
              console.log("("+A3+")");
          }
          eql = A3.toString().concat(eql);
          console.log("("+eql+")"); 
      }
      for(var j = (length_p1-1); j&gt;=0; j--){
          var k = j;
          A3 = 0;
          for( var i = 0; i&lt;=j; i++ ){            
              A1 = parseInt(p1.charAt(k));
              A2 = parseInt(p2.charAt(i));
              k-=1;
              console.log("("+A1+","+A2+") " + k + " , "+ i);
              A3 = (A1 * A2)+A3;  
              console.log("("+A3+")");
          }
          eql = A3.toString().concat(eql);
          console.log("("+eql+")");
      }
      var f_eql = "";
      f_eql = eql.charAt(0);
      for (var i = 1; i&lt;=(eql.length); i++){
          if (eql.charAt(i+1) == ""){
              f_eql += (parseInt(eql.charAt(i)) + carry + 0).toString();
          }else{
              if ((parseInt(eql.charAt(i)) + parseInt(eql.charAt(i+1)) + carry)&lt;10){//carry
                  f_eql += (parseInt(eql.charAt(i)) + parseInt(eql.charAt(i+1))+ carry).toString();
                  carry = 0;
              } else {
                  f_eql += (parseInt(eql.charAt(i)) + parseInt(eql.charAt(i+1)) - 10).toString();
                  carry = 1;
              }
          }
          console.log("("+eql.charAt(i)+")"+eql.charAt(i+1));
          i += 1;
      }
      console.log("fine = ("+eql+")");
      console.log("("+f_eql+")"); 
      return   f_eql;          
  }   
  </code></pre>
  
  <p>please, i getting error with carry and make me headache, where my error? and is this code cool or what it's new method to multiply two big number by me it's called triangle multiplication. </p>
  
  <p>when i'm try multiply </p>
  
  <p>123456789012 --- 12 digit by </p>
  
  <h2>123456789012 --- 12 digit</h2>
  
  <p>141020355684120165200226244249240216176119445036144</p>
  
  <p>my method is </p>
  
  <p>the first digit put down 
  and the second added to third and put down 
  and the forth added to fifth and put down
  and etc to finial digit </p>
  
  <p>but i'm missing error in carry 
  So please help my?</p>