Long multiplication: Difference between revisions

m
m (→‎{{header|C sharp|C#}}: corrected typos)
Line 1,563:
y.lo += (a % hm) * hm; // increment lo part w/ low part of midterm
while (y.lo > mx) { y.lo -= mx; y.hi++; } // check for overflow, adjust both parts as needed
WriteLine(" is {0,75} (which {1} match the BigIntgerBigInteger computation)\n", toStr(y, true),
BS.ToString() == toStr(y) ? "does" : "fails to"); } }
 
Line 1,569:
{{out}}
<pre>The square of (2^64): 18,446,744,073,709,551,616
is 340,282,366,920,938,463,463,374,607,431,768,211,456 (which does match the BigIntgerBigInteger computation)
 
The square of (2^94): 19,807,040,628,566,084,398,385,987,584
is 392,318,858,461,667,547,739,736,838,950,479,151,006,397,215,279,002,157,056 (which does match the BigIntgerBigInteger computation)</pre>
 
=={{header|C++}}==