Long multiplication: Difference between revisions

no edit summary
(Added PicoLisp)
No edit summary
Line 936:
<lang j> (+ 10x&*)/|. 1 4 10 12 9
15129</lang>
 
=={{header|Java}}==
This is a straight-forward implementation of Long multiplication.
It works with numbers of any length since it uses BigInteger.
<lang java>
import java.math.BigInteger;
 
public class LongMult {
public static void main(String[] args) {
BigInteger TwoPow64 = new BigInteger("18446744073709551616");
System.out.println(mult(TwoPow64, TwoPow64));
}
 
public static BigInteger mult(BigInteger a, BigInteger b){
return a.multiply(b);
}
}
</lang>
Output:
<lang>
340282366920938463463374607431768211456
</lang>
 
=={{header|JavaScript}}==