Jump to content

Long multiplication: Difference between revisions

(→‎{{header|JavaScript}}: Minor edits to allow compilation in current JavaScript engines Added output, and comments thereon)
Line 2,350:
=={{header|JavaScript}}==
 
With integer expression inputs at this scale, JavaScript still gives a slightly lossy result, despite the subsequent digit by digit string concatenation approach.
 
The problem is that the JavaScript expression Math.pow(2, 64) evaluates to a rounded:
 
18446744073709552000 rather than the full 18446744073709551616
 
<lang javascript>function mult(num1,num2){
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.