Jump to content

Long multiplication: Difference between revisions

m
added whitespace to the task's preamble, used superscripts instead of a "hat" to show exponentiation.
m (added whitespace to the task's preamble, used superscripts instead of a "hat" to show exponentiation.)
Line 1:
{{task|Arbitrary precision}}
{{task|Arbitrary precision}}In this task, explicitly implement [[wp:long multiplication|long multiplication]]. This is one possible approach to arbitrary-precision integer algebra.
[[Category:Arbitrary precision]] [[Category:Arithmetic operations]]
[[Category:Arithmetic operations]]
 
;Task:
[[Category:Arbitrary precision]] [[Category:Arithmetic operations]]
Explicitly implement   [[wp:long multiplication|long multiplication]].
 
This is one possible approach to arbitrary-precision integer algebra.
For output, display the result of 2^64 * 2^64. The decimal representation of 2^64 is:
 
 
For output, display the result of &nbsp; <big><big> 2<sup>64</sup> * 2<sup>64</sup>.</big></big>
 
 
The decimal representation of &nbsp; <big><big> 2<sup>64</sup> </big></big> &nbsp; is:
18446744073709551616
 
The output of 2^64 * 2^64 is 2^128, and that is:
The output of &nbsp; <big><big> 2<sup>64</sup> * 2<sup>64</sup> </big></big> &nbsp; is &nbsp; <big><big> 2<sup>128</sup>, </big></big> &nbsp; and is:
340282366920938463463374607431768211456
<br><br>
 
=={{header|360 Assembly}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.